Bug #15381 Updated: $_FILES["X"]["name"] strips local path from the users entered name

From: Date: Tue, 05 Feb 2002 15:53:17 +0000
Subject: Bug #15381 Updated: $_FILES["X"]["name"] strips local path from the users entered name
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-79236@lists.php.net to get a copy of this message
 ID:               15381
 Updated by:       sander@php.net
-Summary:          $_FILES["X"]["name"] strips local path from the users
                   entered name
 Reported By:      bob.pardoe@hayslogistics.co.uk
-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] bob.pardoe@hayslogistics.co.uk

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



Thread (2 messages)

« previous php.dev (#79236) next »