当我启用缓存选项以提高内存使用率时:
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
$cacheSettings = array( 'memoryCacheSize' => '32MB');
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);
我收到一个致命错误:
Fatal error: Uncaught exception 'Exception' with message 'Serialization of 'SimpleXMLElement' is not allowed' in /Applications/MAMP/htdocs/XXXX/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php:65 Stack trace: #0 /Applications/MAMP/htdocs/XXXX/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php(65): serialize(Object(PHPExcel_Cell)) #1 /Applications/MAMP/htdocs/XXXX/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php(85): PHPExcel_CachedObjectStorage_PHPTemp->_storeData() #2 /Applications/MAMP/htdocs/XXXX/Classes/PHPExcel/Worksheet.php(1136): PHPExcel_CachedObjectStorage_PHPTemp->addCacheData('BN21', Object(PHPExcel_Cell)) #3 /Applications/MAMP/htdocs/XXXX/Classes/PHPExcel/Reader/Excel2007.php(881): PHPExcel_Worksheet->getCell('BN21') #4 /Applications/MAMP/htdocs/XXXX/engine.php(85): PHPExcel_Reader_Excel2007->load('XXXX.xlsx') #5 {main} thrown in /Applications/MAMP/htdocs/XXXX/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php on line 65
有没有办法解决这个错误?