大神们 小弟来跪求解答

zhangxiaobomxb 2013-04-25 03:43:51
就是 我在用上传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代码是对的 ,是否是我哪里配置不对,求大神解答




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>系统发生错误</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta name="Generator" content="EditPlus"/>
<style>
body{
font-family: 'Microsoft Yahei', Verdana, arial, sans-serif;
font-size:14px;
}
a{text-decoration:none;color:#174B73;}
a:hover{ text-decoration:none;color:#FF6600;}
h2{
border-bottom:1px solid #DDD;
padding:8px 0;
font-size:25px;
}
.title{
margin:4px 0;
color:#F60;
font-weight:bold;
}
.message,#trace{
padding:1em;
border:solid 1px #000;
margin:10px 0;
background:#FFD;
line-height:150%;
}
.message{
background:#FFD;
color:#2E2E2E;
border:1px solid #E0E0E0;
}
#trace{
background:#E7F7FF;
border:1px solid #E0E0E0;
color:#535353;
}
.notice{
padding:10px;
margin:5px;
color:#666;
background:#FCFCFC;
border:1px solid #E0E0E0;
}
.red{
color:red;
font-weight:bold;
}
</style>
</head>
<body>
<div class="notice">
<h2>系统发生错误 </h2>
<div >您可以选择 [ <A HREF="/moca/index.php/Product/showProduct/fname/product.xls">重试</A> ] [ <A HREF="javascript:history.back()">返回</A> ] 或者 [ <A HREF="/moca/index.php">回到首页</A> ]</div>
<p><strong>错误位置:</strong> FILE: <span class="red">D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\Think.class.php</span> LINE: <span class="red">242</span></p>
<p class="title">[ 错误信息 ]</p>
<p class="message">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}</p>
<p class="title">[ TRACE ]</p>
<p id="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<br />
Stack trace:<br />
#0 D:\wamp\wamp\www\Moca\App\Lib\Action\ProductAction.class.php(216): PHPExcel_Reader_Excel2007->canRead('./uploads/produ...')<br />
#1 [internal function]: ProductAction->showProduct()<br />
#2 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(132): call_user_func(Array)<br />
#3 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(159): App::exec()<br />
#4 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\Think.class.php(47): App::run()<br />
#5 D:\wamp\wamp\www\Moca\ThinkPHP\Common\runtime.php(237): Think::Start()<br />
#6 D:\wamp\wamp\www\Moca\ThinkPHP\ThinkPHP.php(32): require('D:\wamp\wamp\ww...')<br />
#7 D:\wamp\wamp\www\Moca\index.php(7): require('D:\wamp\wamp\ww...')<br />
#8 {main})<br/>[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<br />
Stack trace:<br />
#0 D:\wamp\wamp\www\Moca\App\Lib\Action\ProductAction.class.php(216): PHPExcel_Reader_Excel2007->canRead('./uploads/produ...')<br />
#1 [internal function]: ProductAction->showProduct()<br />
#2 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(132): call_user_func(Array)<br />
#3 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\App.class.php(159): App::exec()<br />
#4 D:\wamp\wamp\www\Moca\ThinkPHP\Lib\Core\Think.class.php(47): App::run()<br />
#5 D:\wamp\wamp\www\Moca\ThinkPHP\Common\runtime.php(237): Think::Start()<br />
#6 D:\wamp\wamp\www\Moca\ThinkPHP\ThinkPHP.php(32): require('D:\wamp\wamp\ww...')<br />
#7 D:\wamp\wamp\www\Moca\index.php(7): require('D:\wamp\wamp\ww...')<br />
#8 {main})<br/></p>
</div>
<div align="center" style="color:#FF3300;margin:5pt;font-family:Verdana"> ThinkPHP <sup style='color:gray;font-size:9pt'>3.0</sup><span style='color:silver'> { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]</span>
</div>
</body>
</html>
...全文
229 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
我擦 老大 你吧报错的源码发出来做什么啊 反而懒得看你报错信息啊
zhangxiaobomxb 2013-04-25
  • 打赏
  • 举报
回复
不是很明白啊 windows下面开启那个zip不是只要在phpini里面加个php_zip.dll就行了么
hilojack 2013-04-25
  • 打赏
  • 举报
回复
msg: ZipArchive library is not enabled Pls check: localhost/phpinfo.php 中zip真的开启了吗? 如果没有,再重启一个apache,并检查apache error日志有报错。 http://us3.php.net/manual/en/zip.installation.php

20,359

社区成员

发帖
与我相关
我的任务
社区描述
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
phpphpstorm 技术论坛(原bbs)
社区管理员
  • 开源资源社区
  • phpstory
  • xuzuning
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧