Forum Moderators: coopster

Message Too Old, No Replies

How to return the full path of an uploaded file?

$_FILES['file1']['name'] gives just file name

         

adrianTNT

12:59 pm on Aug 27, 2007 (gmt 0)

10+ Year Member Top Contributors Of The Month



I need a way to find the full path of a file uploaded by file upload form box.

$_FILES['file1']['name'] gives just file name.

I have a file upload form and if the user submitted something wrong I want the page to go back and have the forms maintain its values (the full path to local file, e.g: "c:/docs/landscape.jpg").

Any way to do that? This is a more complex applications so using another upload tool is not an option.

Any ideas?
Thanks.

- Adrian.

jatar_k

1:23 pm on Aug 27, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



try this

echo '<pre>';
print_r($_FILES);
echo '</pre>';

and you can see what there is available in the $_FILES array