Bug #3452: file upload feature broken under Windows web browsers
| From: | jfbell at inetz dot com | Date: | Thu, 10 Feb 2000 23:23:03 +0000 |
| Subject: | Bug #3452: file upload feature broken under Windows web browsers | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15369@lists.php.net to get a copy of this message | ||
From: jfbell@inetz.com
Operating system: FreeBSD 3.4
PHP version: 3.0.14
PHP Bug Type: Other
Bug description: file upload feature broken under Windows web browsers
The following code appears to work when a web browser is started under a UNIX environment, however
the same code produces an error when I start a web browser under a Windows machine.
$image_base="aaa";
if (eregi("\.(jpg|gif)$",$image1,$regs)) {
copy($image1,"../homes/images/".$image_base.".".$regs[1]);
}
The error that appears under a windows browser looks like this:
Warning: Unable to open 'C:\Documents and Settings\jfbell\My Documents\My
Pictures\Sample.jpg' for reading: No such file or directory in
/shared/www/data/old/virtual/i/ivoryhomes/control/modelhomes.phtml on line 18
Obviously, php is trying to use the Windows filename when copying. This is wrong.
Can anyone help with this?
-John