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

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

WBOY
Release: 2016-06-13 10:50:06
Original
916 people have browsed it

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

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template