ID: 15381
Updated by: [EMAIL PROTECTED]
-Summary: $_FILES["X"]["name"] strips local path from the users
entered name
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: W2K Pro
PHP Version: 4.1.0
New Comment:
Not a bug in PHP.
The browser only sends the filename, and no path information. I guess
that's normal HTTP/1.x behaviour.
Previous Comments:
------------------------------------------------------------------------
[2002-02-05 04:56:32] [EMAIL PROTECTED]
I am trying to write a form to upload files to the server.
Running 4.1.0 on W2K Pro, IIS , and php.recommended.ini
The first form gets the local (client) file name i.e.
c:\dir1\dir2\file1.txt this is displayed to the user in the <input type
= file name = filename ... > text box.
The php script that the form posts to uses $_FILES["filename"]["name"].
This returns : file1.txt
The local path to the file has been lost.
I have not seen any documentation that implies that this is intentional
or that there is another element in the array that has the whole C:\...
file name.
As a consequence the file copy fails as the php script cannot find the
file.
Thanks
BOb
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15381&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php