致命错误:找不到类"PHPExcel_Shared_String" [英] Fatal error: Class 'PHPExcel_Shared_String' not found

查看:1445
本文介绍了致命错误:找不到类"PHPExcel_Shared_String"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将PHPExcel用于我的codeigniter应用程序,并且它在localhost中可以正常运行,但是当我将其托管到服务器时,出现以下错误:

I have used PHPExcel for my codeigniter app and it is working perfectly in localhost, but when I host this to server, I am getting following error :

致命错误:在\ xx \ xx \ xx中找不到类'PHPExcel_Shared_String' 第36行的third_party \ PHPExcel \ Autoloader.php

Fatal error: Class 'PHPExcel_Shared_String' not found in \xx\xx\xx third_party\PHPExcel\Autoloader.php on line 36

推荐答案

最新版本的PHPExcel中的自动加载器引入了一项更改,该更改似乎与PHP< 5.3.0

There was a change introduced to the autoloader in the latest version of PHPExcel that appears to have broken backward compatibility with versions of PHP < 5.3.0

如果您编辑Classes/PHPExcel/Autoloader.php文件并更改第58行,则该行应显示为

If you edit the Classes/PHPExcel/Autoloader.php file and change line 58, which should read

return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'), true, true);

return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'));

我已经对github上的developer分支进行了更改,以测试PHP版本并执行相应的行

I've already made a change to the develop branch on github to test for the PHP version and execute the appropriate line

虽然这不是故意的,但请注意,我们确实试图使用户至少升级到PHP 5.3.0版本,因为我们无法解决使用大型电子表格的用户的任何内存/性能问题.请抱怨,直到我们可以使用更新版本的PHP中提供的一些新功能. PHP的5.2版已不再受支持,甚至5.3版也已停产,并且在今年年底之前将不再受支持.

While this was not deliberate, please note that we really are trying to get users to upgrade to at least version 5.3.0 of PHP, because we can't address any of the memory/performance issues that users working with large spreadsheets complain about until we can use some of the new features available in more recent versions of PHP. Version 5.2 of PHP is no longer supported, and even version 5.3 is end-of-life and will be unsupported before the end of this year

这篇关于致命错误:找不到类"PHPExcel_Shared_String"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆