最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
phpexcel导入xlsx文件报错xlsx is not recognised as an OLE file 怎么办
时间:2015-09-30 编辑:简简单单 来源:一聚教程网
最初的做法
代码如下 | 复制代码 |
include 'classes/PHPExcel/IOFactory.php'; $inputFileName = $target;
$objPHPExcel = $objReader->load($inputFileName); '; } |
报错
PHPExcel_Reader_Exception: The filename .1443578799.xlsx is not recognised as an OLE file in Classes\PHPExcel\Shared\OLERead.php on line 89
( ! ) Fatal error: Uncaught exception 'PHPExcel_Reader_Exception' with message 'The filename 1443578799.xlsx is not recognised as an OLE file' in Classes\PHPExcel\Shared\OLERead.php on line 89
( ! ) PHPExcel_Reader_Exception: The filename 1443578799.xlsx is not recognised as an OLE file in Classes\PHPExcel\Shared\OLERead.php on line 89
Call Stack
碰到这个问题我们是因为xlsx出错了,可能通过类型判断 解决办法如下
代码如下 | 复制代码 |
if( $extension =='xlsx' ) |
这样再操作会发现问题已经解决了。
-
上一个: 推荐:Python开发检测网站挂马程序
-
下一个: 使用PHP内置web服务器的教程
相关文章
- PHP导出数据超时的优化建议解读 10-31
- PHP之mysql位运算解析 10-31
- Laravel实现登录跳转功能解析 10-31
- php双向队列解读 10-31
- Laravel异常上下文解决教程 10-24
- php数组查询元素位置方法介绍 10-24