第34行phpExcel的Autoloader.php中出现致命错误 [英] Fatal error in Autoloader.php on line 34 phpExcel

查看:200
本文介绍了第34行phpExcel的Autoloader.php中出现致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用phpExcel,但是运行脚本时出现此错误:

I want to use phpExcel, but when run the script I get this error:

Fatal error: Uncaught exception 'PHPExcel_Exception' with message 'Multibyte function overloading in PHP must be disabled for string functions (2).' in D:\Apache\htdocs\phpExcel\Classes\PHPExcel\Autoloader.php:34 Stack trace: #0 D:\Apache\htdocs\phpExcel\Classes\PHPExcel.php(32): require() #1 D:\Apache\htdocs\phpExcel\index.php(19): include('D:\Apache\htdoc...') #2 {main} thrown in D:\Apache\htdocs\phpExcel\Classes\PHPExcel\Autoloader.php on line 34

我该如何解决?

谢谢

推荐答案

选项1 :如果您有权访问 php.ini 文件,请设置此mbstring.func_overload = 0

Option 1: If you have access to your php.ini file, set this mbstring.func_overload = 0

这是PHPExcel的要求,在其 Autoloader.php 文件中:

It's a requirement of PHPExcel, in their Autoloader.php file:

...
if (ini_get('mbstring.func_overload') & 2) {
    throw new PHPExcel_Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
}
...

选项2 :如果您没有编辑 php.ini 的权限,则可以在 .htaccess 文件中进行设置:

Option 2: If you don't have privileges to edit php.ini, you can setup this in an .htaccess file:

php_value mbstring.func_overload 0

这篇关于第34行phpExcel的Autoloader.php中出现致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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