Enter your question or search term
eg. 'what are my email server settings'
Why is my PHP script not uploading and writing files as it should?
First, be sure to check your syntax. A searchable copy of the PHP manual is available at
php.net.
You must use the move_uploaded_file() function to move the freshly uploaded file to your upload directory. You can not use fopen() or copy() to move the file to your upload directory.
If you are sure the code is correct, the next step is to check the permissions.
The permissions of the upload directory must be set to 2777. Not all FTP clients allow you to set the 2 in 2777 (the set group mode bit). Contact Technical Support (
support@ilisys.com.au or 1800 995 645) if you would like us to apply the permission change for you.
Files that are being written to must also have their permissions set to 2777 and their ownership changed to that of the web server. These settings may be incorrect if the files were originally uploaded by FTP, rather than created by your script. For assistance with this change, contact Technical Support.