PHP文件上传异常值

WBOY
Lepaskan: 2016-06-13 12:02:38
asal
970 orang telah melayarinya

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
Salin selepas log masuk

?

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan