why the internal server error occured when using finfo_file function?

My code is that if (in_array($file_ext, $extensions)) { $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $file_tmp); if ($mime == 'application/msword' || $mime == 'image/gif' || $mime =='image/jpeg' || $mime =="image/png") { move_uploaded_file($file_tmp, $file); } finfo_close($finfo); } else{ $errors[] = 'Extension not allowed: ' . $file_name . ' ' . $file_type; } Console writes that POST http://localhost:82/diplomna/process.php net::ERR_ABORTED 500 (Internal Server Error), after code executing. Where the mistake can be?
http://dlvr.it/RzLCZr

No comments:

Post a Comment