note 22776 added to features.file-upload
| From: | j-php at pureftpd dot org | Date: | Sat, 29 Jun 2002 15:54:11 +0000 |
| Subject: | note 22776 added to features.file-upload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32410@lists.php.net to get a copy of this message | ||
Always use move_uploaded_file() to have your uploaded file in a suitable location, not copy() .
move_uploaded_file() is easier and more secure.
And it will work in safe_mode and with an open_basedir.
It your customers complain about errors like :
Warning: open_basedir restriction in effect. File is in wrong directory in
/users/sexydoo/www.bitchy-sex.com/html/inscription.php on line 40
with scripts managing uploaded files, tell them to replace copy() calls with move_uploaded_file() .
--
http://www.php.net/manual/en/features.file-upload.php
http://master.php.net/manage/user-notes.php?action=edit+22776
http://master.php.net/manage/user-notes.php?action=delete+22776
http://master.php.net/manage/user-notes.php?action=reject+22776