我的猜测是这是Nginx的错误,但是我的错误日志未显示任何相关信息。
在我的页面上有一个名为:ajax的函数。
jQuery.ajax({
type: "POST", // HTTP method POST or GET
processData: false,
contentType: false,
url: "./upload-resize.php", //Where to make Ajax calls
data: mdata, //Form variables
dataType: 'json',
success:function(response){
$(".upload-image").hide();
$(".upload-click").show();
if (response.type == 'success') {
$("#server-response").html('<div class="success">' + response.msg + '</div>');
} else {
$("#server-response").html('<div class="error">' + response.msg + '</div>');
}
}
});
文件upload-resize.php
确实存在。 Chrome的控制台输出以下内容:
无法加载资源:服务器响应状态为500 (内部服务器错误)/upload-resize.php:1
但是,当我单击检查器中的upload-resize.php时,它没有给出404或错误500。它进入该文件,因为它在那里。
有什么想法吗?
我的错误日志是:
#0 /var/www/example.com/html/upload-resize.php(49): Imagick->writeimages('/imagemagick_up...', true)
#1 {main}
thrown in /var/www/example.com/html/upload-resize.php on line 49" while reading response header from upstream, client: 66.70.129.98, server: example.com, request: "POST /upload-resize.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "www.example.com", referrer: "https://www.example.com/"
第49行显示:
$results = $image->writeImages($upload_dir. $_FILES['image_data']['name'], true);