Linux environment upload data failed Tmp_name is empty

Source: Internet
Author: User
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);
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.