The Phpexcel plugin used in the CI framework can be used on the server (previously written by others), but the same code is not available locally, and there are errors, as follows:
Fatal error:uncaught Exception ' exception ' with message ' Could not close zip file uploadfiles/easyadreport-5590e7006ebed- Fixed bit scheduling -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
Ask master how to solve, use of Win7 system
Reply to discussion (solution)
Fatal error:uncaught Exception ' exception ' with message ' Could not close zip file
Fatal error: Exception message for uncaught exception "Unable to close zip file
It could be your virus firewall that opened up your files
1. Permissions issues
2. Chinese name problem
Fatal error:uncaught Exception ' exception ' with message ' Could not close zip file
Fatal error: Exception message for uncaught exception "Unable to close zip file
It could be your virus firewall that opened up your files
My only firewall Symantec Endpoint Protection has been disabled and stopped by me, restart the computer no
1. Permissions issues
2. Chinese name problem
Chinese name can ah, on the server can download down ... permissions See my Project folder permissions read and write modify execute permissions are all there
1. Permissions issues
2. Chinese name problem
Chinese name can ah, on the server can download down ... permissions See my Project folder permissions read and write modify execute permissions are all there
Does the users or everyone have access to read and write changes?
Today, my team leader finally helped me find the answer, the problem here is due to the export when there is a problem, there is no Linux, but under Windows because the export is GBK format, so when the export contains Chinese words will have a pop-up can not be closed, it should be garbled. The correct code for the Save method part
$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 '];
General windows with GBK, the second line instead of replacing:
$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
General windows with GBK, the second line instead of replacing:
$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 ';
Special thanks, and learned a trick!!