当前位置:Gxlcms > PHP教程 > uploadify上传文件报http500异常

uploadify上传文件报http500异常

时间:2021-07-01 10:21:17 帮助过:4人阅读

uploadify上传文件报http500错误
我上传文件成功了,但是报http 500错误
HTML code



 

 

 





 



PHP code

$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'].$_REQUEST['folder'] . '/';
$ext = pathinfo($_FILES['Filedata']['name']);
$ext = $ext['extension'];
if ($ext=='doc'||$ext=='pdf'||$ext=='txt') 
{
    $name = md5(uniqid(rand().microtime())).'.'.$ext;
    $targetFile =  str_replace('//','/',$targetPath) . $name;
}
move_uploaded_file($tempFile,iconv('utf-8','gbk', $targetFile));//这里已经执行了
$path =  str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);
$param = array(
         'name' => $name,
         'path' => $path
        );
$data = Http::connect(CURL_HOST, CURL_PORT)->doPost(EN_SITEURL.'open.php/blog/logatt',$param, 'json');




请高手帮个忙啊!


------解决方案--------------------
把错误提示打开。
php.ini中
display_errors=On
error_reporting=E_ALL & ~E_NOTICE
------解决方案--------------------
PHP程序估计挂了,慢慢查原因。

人气教程排行