note 28153 added to features.file-upload
| From: | bfg at hotmail dot com | Date: | Fri, 03 Jan 2003 23:50:03 +0000 |
| Subject: | note 28153 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41638@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...
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+28153
http://master.php.net/manage/user-notes.php?action=delete+28153
http://master.php.net/manage/user-notes.php?action=reject+28153