Linux environment upload file failed Tmp_name is empty
PHPINFO Displays the following information
File_uploadson
Upload_max_filesize2m
Upload_tmp_dir/users/ririn/sites/tmp
Then I set 777 permissions on this directory chmod 777/users/ririn/sites/tmp is there anything else that needs to be set?
But uploading files is not going to work.
First, there is no file in the TMP directory
Of course backstage with $tmp=$_files[' mypic ' [' tmp_name ']; This also can't get ...
In win is the normal operation of the win in the configuration and here is the same as I choose the file is only more than 100 K
or stick to my code is not Linux to add a little something
$tmp =$_files[' mypic ' [' tmp_name ']; The empty
$name =$_files[' mypic ' [' name '];
$size =$_files[' mypic ' [' Size '];
$arr =array (
' tmp ' = $tmp,
' Name ' = $name,
' Size ' = $size
);
Var_dump ($arr);
?>
The last print is an array (3) {["TMP"]=> string (0) "" ["Name"]=> string (9) "Scoot.png" ["Size"]=> int (0)}
Win is perfectly normal. Linux Upload Permissions
Share to:
------Solution--------------------
You can directly Print_r ($_file) on the PHP page that the form points to, and try to have no results.
------Solution--------------------
Var_dump ($_files);