note 48809 modified in features.file-upload by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 18:49:45 +0000 |
| Subject: | note 48809 modified in features.file-upload by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155181@lists.php.net to get a copy of this message | ||
It's important to note that when using the move_uploaded_file() command, that some
configurations (Especially IIS) will fail if you prefix the destination path with a leading
"/". Try the following:
<?php move_uploaded_file($tmpFileName,'uploads/'.$fileName); ?>
Setting up permissions is also a must. Make sure all accounts have write access to your upload
directory, and read access if you wish to view these files later. You might have to chmod() the
directory or file afterwards as well if you're still getting access errors.
--was--
It's important to note that when using the move_uploaded_file() command, that some
configurations (Especially IIS) will fail if you prefix the destination path with a leading
"/". Try the following:
move_uploaded_file($tmpFileName,'uploads/'.$fileName);
Setting up permissions is also a must. Make sure all accounts have write access to your upload
directory, and read access if you wish to view these files later. You might have to chmod() the
directory or file afterwards as well if you're still getting access errors.
http://php.net/manual/en/features.file-upload.php