脚本宝典收集整理的这篇文章主要介绍了phpExcel如何将设置传递给类,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
从我在网上找到的例子看起来像这样
stackoverflow – fix memory error
$oExcel = new PHPExcel(); $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_PHPTemp; $cacheSettings = array( 'memoryCacheSize' => '512MB'); PHPExcel_Settings::setCacheStorageMethod($cacheMethod,$cacheSettings);
上面的问题是我没有设置excel对象的设置?
$oExcel->setCacheStorageMethod($cacheMethod,$cacheSettings); // this returns method not found error
我想我只是初步错了吗?
setCacheStorageMethod()不是PHPExcel类的方法,因为您尝试在此行中使用:
$oExcel->setCacheStorageMethod($cacheMethod,$cacheSettings);
使用
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_PHPTemp; $cacheSettings = array( 'memoryCacheSize' => '512MB'); PHPExcel_Settings::setCacheStorageMethod($cacheMethod,$cacheSettings); $oExcel = new PHPExcel();
以上是脚本宝典为你收集整理的phpExcel如何将设置传递给类全部内容,希望文章能够帮你解决phpExcel如何将设置传递给类所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。