
$config ['allowed_types'] = 'xls|xlsx|xl';
在我上传一个已.xls后缀的Excel时一直提示文件类型不正确,可是xls明明在allowed_types里面
在上传时我首先 print_r($_FILES ) 结果如下:
Array ( [userfile] => Array ( [name] => Template.xls[type] => application/kset [tmp_name] => C:\Windows\temp\phpACC.tmp [error] => 0 [size] => 7680 ) )
可以看到这个文件type是application/...