使用的在CI 框架中使用的phpexcel插件在服务器上可以用了(之前别人写的),但是同样的代码在本地就是不行,还出现错误,如下:
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';
特别感谢 ,又学了一招!!

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

Alipay PHP...


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function