note 68177 added to function.move-uploaded-file
| From: | theprocrastinater at hotmail dot com | Date: | Mon, 17 Jul 2006 10:28:24 +0000 |
| Subject: | note 68177 added to function.move-uploaded-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114839@lists.php.net to get a copy of this message | ||
An alternative way I have used to ensure unique filenames during uploads is to assign each user a
value, a username if that is applicable, or just a random number. Create the filename using a
user's specfic value and also a timestamp, as logically a single user cannot be submitting more
than 1 file at a time.
This may seem a little unnecceassry however, if you are expecting a large upload quantity of files
it will improve the processing time for each upload, imagine cycling through the loop written below
for 100 or even 1000 files and checking each file exists.
----
Server IP: 64.71.164.2
Probable Submitter: 172.141.127.195
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.move-uploaded-file.php
Edit -- http://master.php.net/note/edit/68177
Del: integrated -- http://master.php.net/note/delete/68177/integrated
Del: useless -- http://master.php.net/note/delete/68177/useless
Del: bad code -- http://master.php.net/note/delete/68177/bad+code
Del: spam -- http://master.php.net/note/delete/68177/spam
Del: non-english -- http://master.php.net/note/delete/68177/non-english
Del: in docs -- http://master.php.net/note/delete/68177/in+docs
Del: other reasons-- http://master.php.net/note/delete/68177
Reject -- http://master.php.net/note/reject/68177
Search -- http://master.php.net/manage/user-notes.php