Svenska (Sverige)English (United Kingdom)
Start Webb PHP Why can i not use file upload from a PHP script?

Why can i not use file upload from a PHP script?

This is because PHP is set to safe_mode, meaning a php script is not allowed to change files for others than the user it runs as and the file upload function stores the temporary file in a temp folder with the webserver user as owner.

The solution is to use the move_uploaded_file function in php

(http://se.php.net/move_uploaded_file)

move_uploaded_file ($sourcepath, $destinationpath);

note that the folder you want to move the file to needs permissions 777