大神们 小弟来跪求解答

php中文网
发布: 2016-06-23 14:06:46
原创
921人浏览过

就是 我在用上传excel文档的时候出错,
 1、在php.ini文件中,将extension=php_zip.dll前面的分号“;”去除;

(如果没有,请添加extension=php_zip.dll此行并确保php_zip.dll文件存在相应的目录)

然后同样在php.ini文件中,将 zlib.output_compression = Off 改为 zlib.output_compression = On 
这些都ok的 ,就是会有下面那个报错 ,不知道原因 求解决 ,php代码是对的 ,是否是我哪里配置不对,求大神解答




nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


系统发生错误






系统发生错误 


您可以选择 [ 重试 ] [ 返回 ] 或者 [ 回到首页 ]

错误位置: file: d:\wamp\wamp\www\moca\thinkphp\lib\core\think.class.php line: 242


[ 错误信息 ]


exception 'Exception' with message 'ZipArchive library is not enabled' in D:\wamp\wamp\www\Moca\App\Lib\ORG\extend\PHPExcel\Reader\Excel2007.class.php:240
Stack trace:
#0 D:\wamp\wamp\www\Moca\App\Lib\Action\ProductAction.class.php(216): PHPExcel_Reader_Excel2007->canRead('./uploads/produ...')
#1 [internal function]: ProductAction->showProduct()
#2 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(132): call_user_func(Array)
#3 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(159): App::exec()
#4 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\Think.class.php(47): App::run()
#5 D:\wamp\wamp\www\Moca\ThinkPHP\Common\runtime.php(237): Think::Start()
#6 D:\wamp\wamp\www\Moca\ThinkPHP\ThinkPHP.php(32): require('D:\wamp\wamp\ww...')
#7 D:\wamp\wamp\www\Moca\index.php(7): require('D:\wamp\wamp\ww...')
#8 {main}


[ TRACE ]



[13-04-25 15:38:04] D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\Think.class.php (242) halt(exception 'Exception' with message 'ZipArchive library is not enabled' in D:\wamp\wamp\www\Moca\App\Lib\ORG\extend\PHPExcel\Reader\Excel2007.class.php:240

Stack trace:

#0 D:\wamp\wamp\www\Moca\App\Lib\Action\ProductAction.class.php(216): PHPExcel_Reader_Excel2007->canRead('./uploads/produ...')

#1 [internal function]: ProductAction->showProduct()

#2 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(132): call_user_func(Array)

#3 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(159): App::exec()

#4 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\Think.class.php(47): App::run()

#5 D:\wamp\wamp\www\Moca\ThinkPHP\Common\runtime.php(237): Think::Start()

#6 D:\wamp\wamp\www\Moca\ThinkPHP\ThinkPHP.php(32): require('D:\wamp\wamp\ww...')

#7 D:\wamp\wamp\www\Moca\index.php(7): require('D:\wamp\wamp\ww...')

#8 {main})
[13-04-25 15:38:04]  () Think::appException(exception 'Exception' with message 'ZipArchive library is not enabled' in D:\wamp\wamp\www\Moca\App\Lib\ORG\extend\PHPExcel\Reader\Excel2007.class.php:240

Stack trace:

#0 D:\wamp\wamp\www\Moca\App\Lib\Action\ProductAction.class.php(216): PHPExcel_Reader_Excel2007->canRead('./uploads/produ...')

#1 [internal function]: ProductAction->showProduct()

#2 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(132): call_user_func(Array)

#3 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(159): App::exec()

#4 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\Think.class.php(47): App::run()

#5 D:\wamp\wamp\www\Moca\ThinkPHP\Common\runtime.php(237): Think::Start()

#6 D:\wamp\wamp\www\Moca\ThinkPHP\ThinkPHP.php(32): require('D:\wamp\wamp\ww...')

#7 D:\wamp\wamp\www\Moca\index.php(7): require('D:\wamp\wamp\ww...')

#8 {main})



 ThinkPHP 3.0 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]



回复讨论(解决方案)

msg:
ZipArchive library is not enabled

Pls check:
localhost/phpinfo.php 中zip真的开启了吗?

如果没有,再重启一个apache,并检查apache error日志有报错。

http://us3.php.net/manual/en/zip.installation.php

不是很明白啊  windows下面开启那个zip不是只要在phpini里面加个php_zip.dll就行了么 

我擦 老大 你吧报错的源码发出来做什么啊  反而懒得看你报错信息啊

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门推荐
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号