RE: [PHP] Getting uploaded filename & directory

From: Date: Mon, 12 Nov 2001 20:37:49 +0000
Subject: RE: [PHP] Getting uploaded filename & directory
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74324@lists.php.net to get a copy of this message
> In setting up a form to allow a user to upload a file, > upon submission of that form, you can get the actual > file name that is being uploaded by accessing the > variable: > > $userfile_name > > (assuming the form element's name where the user > specifies the file is "$userfile"). > > Is there a way to get the full path as well? ie: > > "c:\program files\this directory\uploaded_file.txt" > > ? I tried echoing out $userfile to no avail. I also tried > some javascript that when the form was submitted, > the value for the userfile element was copied to a hidden > form element, but that didn't work either. > > Any ideas? Suggestions? It's not very secure, I think it isn't possible to get a full path .... Lubo Gabal

« previous php.general (#74324) next »