【发布时间】:2011-07-21 07:55:17
【问题描述】:
我正在使用 PHPExcel 库生成 mysql 数据库表的 excel 文件。但是当我调用一个生成 excel 的函数时,我遇到了一个致命错误。下面给出了即将出现的错误。
致命错误:未捕获的异常“异常” 带有消息“无法关闭 zip 文件 DfEeFxMeVtUnSbKoEpTpYdYiYsEnGrQi.xlsx。” 在 /home/testcente2/domains/topcats-backend-testcenter.nl/public_html/dev/core/lib/PHPExcel/Writer/Excel2007.php:337 堆栈跟踪: #0 /home/testcente2/domains/topcats-backend-testcenter.nl/public_html/dev/core/lib/class.IExportModule.php(81): PHPExcel_Writer_Excel2007->save('DfEeFxMeVtUnSbK...') #1 /home/testcente2/domains/topcats-backend-testcenter.nl/public_html/dev/core/lib/class.ExportModule_lang.php(59): IExportModule->_download_Excel2007() #2 /home/testcente2/domains/topcats-backend-testcenter.nl/public_html/dev/controllers/export.get.create.php(12): ExportModule_lang->export() #3 /home/testcente2/domains/topcats-backend-testcenter.nl/public_html/dev/export.php(17): require_once('/home/testcente...') #4 {main} 在第 337 行抛出 /home/testcente2/domains/topcats-backend-testcenter.nl/public_html/dev/core/lib/PHPExcel/Writer/Excel2007.php你好朋友请告诉我为什么会出现这个错误,我们该如何解决这个错误?
【问题讨论】:
-
你能发布一些代码吗?在我看来,您遇到了一些问题,例如文件被压缩的文件夹的访问权限不正确。
-
使用
phpinfo();并查看zlib是否启用??
标签: php