note 28153 rejected from features.file-upload by nicos
| From: | nicos@php.net | Date: | Fri, 03 Jan 2003 23:51:28 +0000 |
| Subject: | note 28153 rejected from features.file-upload by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-41640@lists.php.net to get a copy of this message | ||
In the example from the manual above, the copy or move_uploaded_file commands didn't work for
me.
The issue seems to be that the example only specifies the destination directory, and not the
destination filename :
copy($_FILES['userfile']['tmp_name'], "/place/to/put/uploaded/file");
In my script I used the following instead:
copy($_FILES['userfile']['tmp_name'],
"/place/to/put/uploaded/file/$filename");
where I had earlier defined $filename as = $_FILES['userfile']['name'];
Hope it helps someone...