Title, Centos7
Upload_temp_dir=/tmp (777)
$_server[' Document_root '. '/adpic ' (777)
!--? php//detection file if (!isset ($_files[' file ']) | |!is_uploaded_file ($_files [' File '] [' Tmp_name '])) Exit (' Error, File not found '. Json_encode (Var_dump ($_files))); if ($_files[' file ' [' Error ']--> 0) exit (' Error, file error '); if ($_files[' File ' [' Size '] < 0) exit (' Error, File size unknown ');//switch (getimagesize ($_files[' file ' [' Tmp_name ']) [2]) {//Case 1:// $ext = ' gif ';//break;//case 2://$ext = ' jpg ';//break;//case 4://$ext = ' jpeg ';// break;//case 3://$ext = ' png ';//break;//default://die (' only images in PNG gif jpg are allowed to be uploaded. Var_dump ($_files));//break;//}//file path filename = time (); $imgName = $time. Mt_rand (10000, 99999); $savePath =$_server[' Document_root ']. '/adpic ';//Create Folder//Move file if (!move_uploaded_file ($_files[' file '] [' tmp_name '], $savePath. '/' . $imgName. '.' . $ext)) exit (' Error, file move failed '. error_reporting (E_all));//returns the file address exit ("/adpic/". $imgName. '.' . $ext);
The first problem is that getimagesize ($_files ' file ') is false, what is the situation?
Normal should not be able to get it?
Then the error message is 22527.
The problem description is probably the case, if you need more information I will update immediately, thank you for the answer.
Reply content:
Title, Centos7
Upload_temp_dir=/tmp (777)
$_server[' Document_root '. '/adpic ' (777)
!--? php//detection file if (!isset ($_files[' file ']) | |!is_uploaded_file ($_files [' File '] [' Tmp_name '])) Exit (' Error, File not found '. Json_encode (Var_dump ($_files))); if ($_files[' file ' [' Error ']--> 0) exit (' Error, file error '); if ($_files[' File ' [' Size '] < 0) exit (' Error, File size unknown ');//switch (getimagesize ($_files[' file ' [' Tmp_name ']) [2]) {//Case 1:// $ext = ' gif ';//break;//case 2://$ext = ' jpg ';//break;//case 4://$ext = ' jpeg ';// break;//case 3://$ext = ' png ';//break;//default://die (' only images in PNG gif jpg are allowed to be uploaded. Var_dump ($_files));//break;//}//file path filename = time (); $imgName = $time. Mt_rand (10000, 99999); $savePath =$_server[' Document_root ']. '/adpic ';//Create Folder//Move file if (!move_uploaded_file ($_files[' file '] [' tmp_name '], $savePath. '/' . $imgName. '.' . $ext)) exit (' Error, file move failed '. error_reporting (E_all));//returns the file address exit ("/adpic/". $imgName. '.' . $ext);
The first problem is that getimagesize ($_files ' file ') is false, what is the situation?
Normal should not be able to get it?
Then the error message is 22527.
The problem description is probably the case, if you need more information I will update immediately, thank you for the answer.
has been resolved, compared to the php.ini, found to be the reason for the value of Open_basedir, empty after the return to normal.