Ok, the temporary filename (including path) is stored in the $_FILES['userfile']['tmp_name'] ... if you print that var you will see exactly where the file is and what is the name (a temporary one) that PHP assigned to it.
Always remember to move tha file to the place where you want the file to be, with a better name. For that use this:
[php]
$tmp_name = $_FILES['userfile']['tmp_name'];
$new_name = "/home/www/whatever/whatever/filename.xxx";
move_uploaded_file($tmp_name, $new_name);
[/php]
As far as I remember you can change the place where temporary files are uploaded in your php.ini file, but keep in mind that sessions are stored there also and it is recommended to be your tmp folder.
If you want to change this folder to the one where you want your files to be when they are directly uploaded... don't do that. It's better to upload to the temp folder and then move it to the one you want.
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
Offline 57 posts
since Mar 2005