时间:2021-07-01 10:21:17 帮助过:9人阅读
1、$upfile["type"]:
xla application/vnd.ms-excel
xlc application/vnd.ms-excel
xll application/x-excel
xlm application/vnd.ms-excel
xls application/vnd.ms-excel
xlt application/vnd.ms-excel
xlw application/vnd.ms-excel
2、临时目录不用你管,上传程序执行完系统会自动删除临时文件。
1、$upfile["type"]:
xla application/vnd.ms-excel
xlc application/vnd.ms-excel
xll application/x-excel
xlm application/vnd.ms-excel
xls application/vnd.ms-excel
xlt application/vnd.ms-excel
xlw application/vnd.ms-excel
2、临时目录不用你管,上传程序执行完系统会自动删除临时文件。
这些都是excle格式的吗,只要$type="application/vnd.ms-excel"这样吗
我是写个这个?
witch ($type) {
case 'xla application/vnd.ms-excel ' : $ok=1;
break;
case 'xlc application/vnd.ms-excel' : $ok=1;
break;
case 'xll application/x-excel ' : $ok=1;
break;
case ' xlm application/vnd.ms-exce' : $ok=1;
break;
case 'xls application/vnd.ms-excel' : $ok=1;
break;
case 'xlt application/vnd.ms-excel' : $ok=1;
break;
case 'xlw application/vnd.ms-excel' : $ok=1;
break;
}
判断扩展名吧