note 26726 deleted from features.file-upload by philip
| From: | philip@php.net | Date: | Wed, 19 Feb 2003 16:55:29 +0000 |
| Subject: | note 26726 deleted from features.file-upload by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-44210@lists.php.net to get a copy of this message | ||
I had trouble with my file uploader, the reason was that the file is deleted from the temporary
directory at the end of the request if it has not been moved away or renamed. The way that I solved
this problem was specifying the file like this:
if(is_uploaded_file($_FILES['userfile']['tmp_name']))
{
copy($_FILES['userfile']['tmp_name'], "../somefolder/" .
$_FILES['userfile']['name']);
}
By specifying the file with $_FILES['userfile']['name']); and MAKING SURE THAT
THE DESTINATION FOLDER HAS THE PRIVILEGES NEEDED (CHMOD 777), you wont have any problem.