首頁  >  文章  >  後端開發  >  PHP文件上传异常值

PHP文件上传异常值

WBOY
WBOY原創
2016-06-13 12:02:38969瀏覽

PHP文件上传错误值

?

switch ($_FILES['Filedata']['error']) {    case 0:        $msg = "No Error";         break;    case 1:        $msg = "The file is bigger than this PHP installation allows";        break;    case 2:        $msg = "The file is bigger than this form allows";        break;    case 3:        $msg = "Only part of the file was uploaded";        break;    case 4:        $msg = "No file was uploaded";        break;    case 6:        $msg = "Missing a temporary folder";        break;    case 7:        $msg = "Failed to write file to disk";        break;    case 8:        $msg = "File upload stopped by extension";        break;    default:        $msg = "unknown error ".$_FILES['Filedata']['error'];        break;}echo ($msg) ? "Error: ".$_FILES['Filedata']['error']." Error Info: ".$msg : "1";// 1  This is required for onComplete to fire on Mac OSX

?

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn