#3452 [Opn->Bgs]: file upload feature broken under Windows web browsers

From: Date: Tue, 01 Oct 2002 01:19:51 +0000
Subject: #3452 [Opn->Bgs]: file upload feature broken under Windows web browsers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20858@lists.php.net to get a copy of this message
ID: 3452 Updated by: hholzgra@php.net Reported By: jfbell@inetz.com -Status: Open +Status: Bogus Bug Type: Other Operating System: FreeBSD 3.4 PHP Version: 3.0.14 New Comment: Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. thats how windows browsers treat file uploads you can always use basename() to extract just the filename Previous Comments: ------------------------------------------------------------------------ [2000-02-11 00:23:03] jfbell@inetz.com 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=3452&edit=1

« previous php.bugs (#20858) next »