欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

大神们 小弟来跪求解答

程序员文章站 2022-05-11 18:20:22
...
就是 我在用上传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代码是对的 ,是否是我哪里配置不对,求大神解答







系统发生错误






系统发生错误


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

错误位置: 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就行了么

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