读取中文的xls.csv文件会有问题,网上找了下资料,发现PHPExcel类库好用,官网地址:http://phpexcel.codeplex.com/ 1.读取xls文件内容 <?php //读取xls header("Content-Type:text/html;charset=utf-8"); include 'Classes/PHPExcel.php'; include 'Classes/PHPExcel/IOFactory.php'; function readxls(…
我之前写过一篇PHP读取csv文件的内容 上代码index.php <?php /** * * @author XC * */ class Excel { public $currentSheet; public $filePath; public $fileType; ; public $allColumn; public $allRow; public function initialized($filePath) { if (file_exists($filePath)) { $this-…
//读取 <?php header("Content-Type:text/html;charset=utf-8"); include 'Classes/PHPExcel.php'; include 'Classes/PHPExcel/IOFactory.php'; function readxls($file, $type) { $xlsReader = PHPExcel_IOFactory::createReader($type); $xlsReader->setRead…