PHPExcel插件使用中Couldnotclosezipfileuploadfiles/EasyA
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了PHPExcel插件使用中Couldnotclosezipfileuploadfiles/EasyA,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2961字,纯文字阅读大概需要5分钟。
内容图文
![PHPExcel插件使用中Couldnotclosezipfileuploadfiles/EasyA](/upload/InfoBanner/zyjiaocheng/204/06db3cdd746a4269ae9713ba51def3ee.jpg)
Fatal error: Uncaught exception 'Exception' with message 'Could not close zip file uploadfiles/EasyADReport-5590e7006ebed-固定位排期-20150722101220.xlsx.' in D:\svn\smartAd\trunk\application\libraries\PHPExcel\Writer\Excel2007.php:380 Stack trace: #0 D:\svn\smartAd\trunk\application\controllers\report\query.php(915): PHPExcel_Writer_Excel2007->save('uploadfiles/Eas...') #1 [internal function]: Query->Excel() #2 D:\svn\smartAd\trunk\system\core\CodeIgniter.php(359): call_user_func_array(Array, Array) #3 D:\svn\smartAd\trunk\index.php(294): require_once('D:\svn\smartAd\...') #4 {main} thrown in D:\svn\smartAd\trunk\application\libraries\PHPExcel\Writer\Excel2007.php on line 380
请问高手如何解决,使用的win7系统
回复讨论(解决方案)
Fatal error: Uncaught exception 'Exception' with message 'Could not close zip file
致命错误:未捕获的异常的异常的消息“无法关闭ZIP文件
可能是你的病毒防火墙打开了你的文件
1.权限问题
2.中文名问题
Fatal error: Uncaught exception 'Exception' with message 'Could not close zip file
致命错误:未捕获的异常的异常的消息“无法关闭ZIP文件
可能是你的病毒防火墙打开了你的文件
我的唯一的防火墙Symantec Endpoint Protection已经被我禁用且停止了,重启电脑不行
1.权限问题
2.中文名问题
中文名可以啊,服务器上就能下载下来的。。。权限看了我项目的文件夹权限 读写修改执行权限都是有的
1.权限问题
2.中文名问题
中文名可以啊,服务器上就能下载下来的。。。权限看了我项目的文件夹权限 读写修改执行权限都是有的
Users或者everyone也有读写改的权限么
今天我的组长终于帮我找到了答案,这里出现的问题是由于导出时候出现的一个问题,在linux下没有,但是windows下因为导出的是gbk格式的 所以在导出的时侯含有中文的话就会有弹出关闭不了的情况,应该关闭的是乱码。正确的代码 save方法那部分
$path='uploadfiles/'; $output['url']=$path.'EasyADReport-'.$args['plan'].'-'.mb_convert_encoding($arrPlan['name'],'gbk','UTF-8').'-'.date('YmdHis').'.xlsx'; $output['url1']=$path.'EasyADReport-'.$args['plan'].'-'. $arrPlan['name'].'-'.date('YmdHis').'.xlsx'; $objWriter=PHPExcel_IOFactory::createWriter($this->phpexcel,'Excel2007'); $objWriter->save($output['url']); //$output['url']=$this->config->config['base_url'].$output['url']; $output['url']=$this->config->config['base_url']. $output['url1'];
一般windows下面用gbk,第二行不如换成:
$output['url']=$path.'EasyADReport-'.$args['plan'].'-'.((strtolower(substr(PHP_OS,0,3))=='win') ? mb_convert_encoding($arrPlan['name'],'gbk','UTF-8') : $arrPlan['name']).'-'.date('YmdHis').'.xlsx';
http://bbs.csdn.net/topics/391079330
一般windows下面用gbk,第二行不如换成:
$output['url']=$path.'EasyADReport-'.$args['plan'].'-'.((strtolower(substr(PHP_OS,0,3))=='win') ? mb_convert_encoding($arrPlan['name'],'gbk','UTF-8') : $arrPlan['name']).'-'.date('YmdHis').'.xlsx';
特别感谢 ,又学了一招!!
内容总结
以上是互联网集市为您收集整理的PHPExcel插件使用中Couldnotclosezipfileuploadfiles/EasyA全部内容,希望文章能够帮你解决PHPExcel插件使用中Couldnotclosezipfileuploadfiles/EasyA所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。