引用的类被废弃undefined method think\Loader::import()(thinkPHP5.0--5.1)
作者:互联网
文件上传导入的引用undefined method think\Loader::import()
use
use PhpOffice\PhpSpreadsheet\IOFactory;
原来的引用5.0
Loader::import('.PHPExcel.PHPExcel.IOFactory');
$objReader = new \PHPExcel_Reader_Excel2007();
修改成
$objReader = IOFactory::createReader('Xlsx');
标签:5.1,use,PHPExcel,undefined,--,Loader,IOFactory,import,method 来源: https://www.cnblogs.com/junzibuqing/p/16445469.html