原因:
首次调用出现了:
HTTP request sent, awaiting response... 413 Request Entity Too Large
我按照网上的教程改nginx配置
改为:
client_max_body_size 100m;
满以为解决问题,再次执行报错。
HTTP request sent, awaiting response... 502 Bad Gateway
网上有的说php.ini要配置,但是我的php.ini 配置是64M
max_execution_time 300 300
max_file_uploads 20 20
max_input_nesting_level 64 64
max_input_time 60 60
max_input_vars 1000 1000
memory_limit 128M 128M
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
post_max_size 64M 64M
upload_max_filesize 64M 64M
原因:
首次调用出现了:
HTTP request sent, awaiting response... 413 Request Entity Too Large
我按照网上的教程改nginx配置
改为:
client_max_body_size 100m;
满以为解决问题,再次执行报错。
HTTP request sent, awaiting response... 502 Bad Gateway
网上有的说php.ini要配置,但是我的php.ini 配置是64M
max_execution_time 300 300
max_file_uploads 20 20
max_input_nesting_level 64 64
max_input_time 60 60
max_input_vars 1000 1000
memory_limit 128M 128M
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
post_max_size 64M 64M
upload_max_filesize 64M 64M
php -S 127.0.0.1:8080 -t /png/www/example.com/public_html/
// chmod 777 /png/www/example.com/public_html/app/yab/static/
// http://127.0.0.1:8080/app/yab/upload.php
';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}
echo 'Here is some more debugging info:';
print_r($_FILES);
print "
";
exit();
}
?>
Send this file:
输出:
File is valid, and was successfully uploaded.
Here is some more debugging info:Array
(
[userfile] => Array
(
[name] => firefox.zip
[type] => application/zip
[tmp_name] => /tmp/phpG1PdtU
[error] => 0
[size] => 93938426
)
)