Re: PHP 4.0 Bug #8525 Updated: fileupload bug
| From: | (Manuel Stritt) | Date: | Thu, 04 Jan 2001 12:27:40 +0000 |
| Subject: | Re: PHP 4.0 Bug #8525 Updated: fileupload bug | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-42917@lists.php.net to get a copy of this message | ||
I use PHP as CGI...
Does stripslashes not work in the module version ? hmm - does that mean it's not
nessesary anymore ?
bye,
Manuel
> Do you use PHP as CGI or module? IIRC you can't use stripslashes($bild) in the module
> version on Win32.
>
> Instead you have to access directly to $bild.
>
> -Martin
>
> Previous Comments:
> ---------------------------------------------------------------------------
>
> [2001-01-02 15:18:04] manuel@stritt.de
> I have problems with fileupload with the new version (4.04).
>
> With the old version ( 3.x) all worked fine.
>
> Look at this:
>
> $id=5;
>
> $smallpic = stripslashes($bild);
>
> if ((file_Exists($smallpic)) AND (!($smallpic=="")))
>
> {
>
> $fp = fopen($smallpic, "r");
>
> $datei = fread($fp, filesize($smallpic));
>
> fclose($fp);
>
> $smallname = $id."bild.jpg";
>
> $fp = fopen("$bildpfad$smallname", "w+");
>
> fwrite($fp, "$datei");
>
> fclose($fp);
>
> } else $smallname="";
>
> Normally, in $smallname should be the correct filename
>
> from the uploaded pic - but it's empty. It's empty,
>
> because the file does not exists.
>
> In $smallname I have something like
>
> "c:tempphp9005.TMP" - but I think this is incorrect.
>
> Well - with the old version (3.x) it worked fine.
>
>
>
> ---------------------------------------------------------------------------
>
> Full Bug description available at: http://bugs.php.net/?id=8525