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

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

WBOY
WBOYOriginal
2016-06-13 10:50:06895browse

在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的专栏

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