Home  >  Article  >  Backend Development  >  在window2003 iis环境下,PHPExcel无法创建临时文件的问题_PHP教程

在window2003 iis环境下,PHPExcel无法创建临时文件的问题_PHP教程

WBOY
WBOYOriginal
2016-07-13 17:51:581023browse

在PHPExcel/Shared/OLE/OLE_File.php 中 function init

 

 $this->_tmp_filename = tempnam($this->_tmp_dir, "OLE_PPS_File");

 下加入

 

 if($this->->_tmp_filename==false){

 

$this->->_tmp_filename="C:\\WINDOWS\\Temp\\".time()."tmp";

}

 

 

因为

tempnam 函数 在windows2003 中 无法生成 临时文件名

 

 

摘自 lpdx111的专栏

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478173.htmlTechArticle在PHPExcel/Shared/OLE/OLE_File.php 中 function init $this-_tmp_filename = tempnam($this-_tmp_dir, OLE_PPS_File); 下加入 if($this--_tmp_filename==false){ $this--_tmp_filename=C...
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