PHP文件上传异常值

WBOY
发布: 2016-06-13 12:02:38
原创
970 人浏览过

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
登录后复制

?

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板