我刚刚更新了phpexcel,phpspreadsheet我注意到弹出了这个错误:
ErrorException (E_DEPRECATED) 不推荐使用带大括号的数组和字符串偏移访问语法
需要“类/PHPExcel.php”;
这是我的代码的一部分,它触发了上述错误:
文件: project/public/Classes/PHPExcel/Shared/ZipStreamWrapper.php
public function stream_open($path, $mode, $options, &$opened_path)
{
// Check for mode
if ($mode{0} != 'r') { //Error Line
throw new PHPExcel_Reader_Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.');
}
文件: project/public/Classes/PHPExcel.php
/** PHPExcel root directory */
if (!defined('PHPEXCEL_ROOT')) {
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/');
require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); //Error Line
}
文件: app/Http/Controllers/analyticsAuth/statement.old.php
use PHPExcel_Reader_Excel2007;
use PHPExcel;
use PHPExcel_IOFactory;
use ZipArchive;
require 'Classes/PHPExcel.php'; //Error Line
文件: project/public/Classes/PHPExcel/Autoloader.php
PHPExcel_Autoloader::Register();
PHPExcel_Shared_ZipStreamWrapper::register(); //Error Line
if (ini_get('mbstring.func_overload') & 2) {
throw new Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
}
谢谢
海绵宝宝撒
慕田峪4524236