note 26859 deleted from function.copy by betz
| From: | betz@php.net | Date: | Tue, 23 Sep 2003 09:13:10 +0000 |
| Subject: | note 26859 deleted from function.copy by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56945@lists.php.net to get a copy of this message | ||
Note Submitter: tom@tom420.com
----
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 :)