When uploading a file from iPhone, my code produces the following error:
Warning: move_uploaded_file() Unable to move ‘/tmp/phpUcqFVq’ to ‘/var/www/ds1134/http.www.xxx.com/app/1316254141147.jpg’ in /var/www/ds1134/https.www.xxx.com/user.php on line 2866
$_FILES looks like:
[file] => Array
(
[name] => 1316250632283.jpg
[type] =>
[tmp_name] => /tmp/phpFio7gb
[error] => 0
[size] => 35515
)
My PHP code for uploading is:
if (move_uploaded_file($_FILES["file"]["tmp_name"], "/var/www/ds1134/http.www.xxx.com/app/".$_FILES["file"]["name"]))
{
echo "done";
}
You could add some precondition checks to find out why the file could not be written: