note 26859 added to function.copy
| From: | tom at tom420 dot com | Date: | Fri, 15 Nov 2002 03:22:00 +0000 |
| Subject: | note 26859 added to function.copy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39515@lists.php.net to get a copy of this message | ||
Those of you looking for how to copy an uploaded file should look for this function instead:
move_uploaded_file()
It's described and explained under Handling File Uploads in the PHP manual (item 18).
Advantages:
- Secure: No worry, it won't copy anything but a file that was just uploaded
- Bypasses safe mode and base_dir securities (the function is totally safe, no danger)
- Takes care of deleting the file (actually it moves it, as the name implies)
Tom :)
--
http://www.php.net/manual/en/function.copy.php
http://master.php.net/manage/user-notes.php?action=edit+26859
http://master.php.net/manage/user-notes.php?action=delete+26859
http://master.php.net/manage/user-notes.php?action=reject+26859