日期:2014-05-17  浏览次数:20479 次

使用PHPEXCEL读取网络文件
读取本地文件没问题。换成读取web文件
Could not open xxx.xls for reading! File does not exist.

file_exists报错。 如果改成file_get_contents()  取出的数据又不正常。求解决方案

------解决方案--------------------
他本身就是用 file_get_contents 的
        public function read($sFileName)
        {
                // Check if file exists and is readable
                if(!is_readable($sFileName)) {
                        throw new Exception("Could not open " . $sFileName . " for reading! File does not exist, or it is not readable.");
                }

                // Get the file data
                $this->data = file_get_contents($sFileName);