$fileinfo=$_FILES['myFile'];
$maxSize=209715200;
$allowExt=array('jpeg','jpg','png','gif','wbmp');
if($fileinfo['error']==UPLOAD_ERR_OK){ //判断错误号
if($fileinfo['size']>$maxSize) {
exit('文件过大了');
}
//$Ext=strtolower(end(explode('.',$fileinfo['name'])));
$Ext=pathinfo($fileinfo['name'],UPLOAD_ERR_EXTENSION);
if(!in_array($Ext,$allowExt)){ //判断是否为allowExt数组以外的函数
exit('非法文件上传');
文件格式不对呗