Mailinglisten-Archive |
Am 22.04.2001 um 17:23 schrieb Dominik von Werdt:
>Hallo!
>
>Ich wollte eine Datei namens index.php bei f2s.com raufladen, nach einigen
>anl=E4ufen (Datei war immer 0 Bytes gross) hat das dann auch geklappt.=
Aber
>was soll die Meldung???
Ich weiss nicht ganz genau, ob es deine Frage trifft, aber fuer den Upload
musst du bei f2s php als cgi-Script aufrufen. Ist bei denen in der faq
beschrieben.
Anbei ein Script, dass bei mir uploads entgegen nimmt, wichtig ist die=
erste
Zeile und die direkten Pfadangaben:
___________________ schnip -------------------------------------------
#!/usr/bin/php
<?php
include("/web/sites/8/mipietsch/www.phpspace.f2s.com/wwl/config.php");
include("/web/sites/8/mipietsch/www.phpspace.f2s.com/wwl/functions.php");
/*
Is PHP running in SAFE MODE?
Yes. The PHP engine is compiled as a safe mode enabled Apache module. This=
makes it execute PHP scripts extremely quickly and safely. If the safe=
mode is too restrictive for your requirements, eg: you want to create a=
file upload script, then the php cgi engine can be used instead.
To run the slower cgi version of PHP your php file should end in .cgi and=
include at the top of the file the line:
#!/usr/bin/php
For more details on cgi scripts please see the Perl section of the website=
FAQ.
*/
putenv("tmpdir=3D/web/sites/8/mipietsch/www.phpspace.f2s.com/wwl");
if (isset($probe)){
// Bugfix f=FCr: http://www.securityfocus.com/archive/1/80106
if ( isset($HTTP_COOKIE_VARS["probe"]) ||
isset($HTTP_POST_VARS ["probe"]) ||
isset($HTTP_GET_VARS ["probe"])
) die("Aus Sicherheitsgr=FCnden stirbt das Script jetzt.");
copy($probe, $basedir."picupload/$edtDatName");
printf(
"Die Datei steht jetzt als %s zur Verf=FCgung.<br>\n",
$host.$startdir."picupload/$edtDatName"
);
printf(
"Sie ist %s Bytes gro=DF und vom Typ %s.<br>\n",
$probe_size, $probe_type
);
}
?>
php::bar PHP Wiki - Listenarchive