0

在遇到超出内存限制的问题后,我将缓存功能添加到我的 phpexcel 调用中。现在可以完全读取excel,但每次之后我都会收到错误:ERR_EMPTY_RESPONSE

这是我的 PHPExcel 调用代码:

$cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_phpTemp;
$cacheSettings = array( ' memoryCacheSize ' => '8MB');
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
/** Create a new Reader of the type defined in $inputFileType **/
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
/** Advise the Reader that we only want to load cell data, not formatting **/
$objReader->setReadDataOnly(true);
$excel = $objReader->load($file);

我希望你能帮助我。谢谢!

4

0 回答 0