Uploadify Upload file http500 error
I uploaded the file successfully, but reported an HTTP 500 error
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));//This has been performed $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 ');
Please help a master to do a favor Ah!
------Solution--------------------
Open the error prompt.
In php.ini
Display_errors=on
Error_reporting=e_all & ~e_notice
------Solution--------------------
PHP program estimates hang up, slowly check the reason.