PHP 4.0 Bug #8525: fileupload bug
| From: | manuel at stritt dot de | Date: | Tue, 02 Jan 2001 20:18:04 +0000 |
| Subject: | PHP 4.0 Bug #8525: fileupload bug | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42665@lists.php.net to get a copy of this message | ||
From: manuel@stritt.de
Operating system: win98
PHP version: 4.0.4
PHP Bug Type: Filesystem function related
Bug description: fileupload bug
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.
--
Edit Bug report at: http://bugs.php.net/?id=8525&edit=1