note 88601 deleted from function.move-uploaded-file by sobak
| From: | sobak@php.net | Date: | Thu, 01 Dec 2016 17:32:48 +0000 |
| Subject: | note 88601 deleted from function.move-uploaded-file by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-207895@lists.php.net to get a copy of this message | ||
Note Submitter: omgmain at gmail dot com
----
This function should run perfectly, but just in case there are errors, this should help.
1 : Check that the syntax is correct. Remember, lines end with ;
2 : Make sure that the file you're moving exists, and that the place you're writing to
is...well, writable. Sometimes, for instance with mac, they make the file so that it can only be
accessed by the system, and you. You need to make it available for everyone.
3 : Make sure that the file size of the file you're uploading is under the max upload size. You
can change the allowed file size on the php.ini file. The default value is 2M (M as in Megabytes).
Also make sure that uploading is allowed
---
If you don't have any errors, then give yourself a pat on the back. BUT, to make your script
more secure, put in your file:
str_replace('.', '', $_FILES['file name']['name']);
str_replace('/', '', $_FILES['file name']['name']);
Replace file name with the file name, and you're good to go!