我正在尝试使用Simple-Ajax-Uploader,但它给了我以下输出:
GET <URL> net::ERR_EMPTY_RESPONSE
我不确定我做错了什么 我的PHP代码:
<?php
require('Uploader.php');
// Directory where we're storing uploaded images
// Remember to set correct permissions or it won't work
$upload_dir = '/uploads/';
echo "reached";
$uploader = new FileUpload('uploadfile');
// Handle the upload
$result = $uploader->handleUpload($upload_dir);
if (!$result) {
exit (json_encode(array('success' => false, 'msg' => $uploader->getErrorMsg())));
}
echo json_encode(array('success' => true, 'file' => $uploader->getFileName()));
?>
可以找到Uploader.php:https://github.com/LPology/Simple-Ajax-Uploader/blob/master/extras/Uploader.php
答案 0 :(得分:0)
问题在于我正在使用的网络服务器,它无法调用/执行php脚本。