Home >Backend Development >PHP Tutorial >大神们 小弟来跪求解答

大神们 小弟来跪求解答

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:06:46820browse

就是 我在用上传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就行了么 

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

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