0

我使用PHPExcel_1.7.9并尝试加载一个 utf-8 文件名$filename = "phố.xlsx";来读取它。喜欢

$filename = "phố.xlsx";
require_once 'Classes/PHPExcel/IOFactory.php';

$objPHPExcel = PHPExcel_IOFactory::load($filename);

我得到像这样的错误

Fatal error: Uncaught exception 'PHPExcel_Reader_Exception' with message 'Could not open phố.xlsx for reading! File does not exist.' in ...\PHPExcel_1.7.9_doc\Classes\PHPExcel\Reader\Excel2007.php:82 Stack trace: 
#0 ...\PHPExcel_1.7.9_doc\Classes\PHPExcel\IOFactory.php(268): PHPExcel_Reader_Excel2007->canRead('ph???.xlsx') 
#1 ...\PHPExcel_1.7.9_doc\Classes\PHPExcel\IOFactory.php(191): PHPExcel_IOFactory::createReaderForFile('ph???.xlsx') 
#2 ...\PHPExcel_1.7.9_doc\read.php(16): PHPExcel_IOFactory::load('ph???.xlsx') #3 {main} thrown in ...\PHPExcel_1.7.9_doc\Classes\PHPExcel\Reader\Excel2007.php on line 82

我如何加载名称为 utf-8 的文件,谢谢

4

0 回答 0