Home  >  Article  >  Backend Development  >  phpexcel上传文件错误,我在我的目录下找不到临时文件名

phpexcel上传文件错误,我在我的目录下找不到临时文件名

WBOY
WBOYOriginal
2016-06-23 13:50:471552browse

上传文件报的错误时是:Fatal error: Uncaught exception 'Exception' with message 'Could not open 20140819171004.xlsx for reading! File does not exist.',我查了一下最根源应该是      $this->excel->read($_FILES['excel']['name']);,这一句,我想找到这个临时文件但是没有找到,我用的是phpexcel插件,一下是具体的报错
各位大神帮忙啊……


回复讨论(解决方案)

文件 20140819171004.xlsx 不存在!

上面的那个错误是我将一个临时文件名tmp_name改成了,name,以下是现在的报错,我怀疑是不是临时文件名的问题,我在目录里找不到临时文件名

你现在的问题是没有加载 php_zip 扩展
而 xlsx 文件是用 zip 打包的一组 XML 文件
没有加载 php_zip 扩展的话,既不能解包读取数据,也不能打包生成 xlsx 文件

知道是什么原因了,原来是服务器换了,这个服务器里面没有开启php_zip.dll,谢谢了……

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn