久久久久在线观看_又色又爽又黄的免费视频播放_一区中文字幕_日韩电影在线播放

今日焦點 焦點資訊 營銷之道 企業報道 淘寶運營 網站建設 軟件開發 400電話
  當前位置: 首頁 » 資訊 » 軟件開發 » 正文

PHP讀取Excel并展示實現代碼

放大字體  縮小字體 發布日期:2018-02-27  來源:企業800網  作者:新格網  瀏覽次數:869  【去百度看看】
核心提示:本文主要和大家分享PHP讀取Excel并展示實現代碼,希望能幫助到大家。

本文主要和大家分享PHP讀取Excel并展示實現代碼,希望能幫助到大家。

使用這個工具. phpExcelReader因為免費啊

index.php 引入資源文件 excel_reader2.php .

<?phperror_reporting(E_ALL ^ E_NOTICE);
error_reporting(0);// error_reporting(E_ALL ^ E_NOTICE);require_once 'excel_reader2.php'; //加載工具$data = new Spreadsheet_Excel_Reader("example.xls"); //將指定excel文件交給工具進行解析,并把結果賦給$data變量echo $data->dump(true,true);//輸出結果,其中dump()函數的兩個參數用于指定否需要顯示excel文件中原有的行號和列號
 ?>

因為這個工具是遠古時期的東西,php7環境直接架起來會有錯誤提示.
修改excel_reader2.php以下幾個地方用來修改和屏蔽錯誤..

  1. 98行注銷 function OLERead() { } 這個函數

  2. split( 替換成 explode(

  3. index.php 上面屏蔽錯誤選項 `error_reporting(0);

修改上面還是有點警告,如下

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Spreadsheet_Excel_Reader has a deprecated constructor in D:\xampp\htdocs\pdfreader\excel_reader2.php on line 312Warning: gmdate() expects parameter 2 to be integer, float given in D:\xampp\htdocs\pdfreader\excel_reader2.php on line 79Warning: gmdate() expects parameter 2 to be integer, float given in D:\xampp\htdocs\pdfreader\excel_reader2.php on line 79

怎么辦呢? Easy, 來~

error_reporting(0);

相關推薦:

詳細介紹PHPExcel讀取Excel時間的示例代碼

php生成與讀取excel文件

phpExcel讀取excel文件

以上就是PHP讀取Excel并展示實現代碼的詳細內容,更多請關注php中文網其它相關文章!

 
關鍵詞: Excel,php,代碼
 
[ 資訊搜索 ]  [ 加入收藏 ]  [ 告訴好友 ]  [ 打印本文 ]  [ 違規舉報 ]  [ 關閉窗口 ]

 
0條 [查看全部]  相關評論

 
網站首頁 | 關于我們 | 聯系方式 | 使用協議 | 版權隱私 | 網站地圖 | 排名推廣 | 廣告服務 | 積分換禮 | 網站留言 | RSS訂閱 | 皖ICP備2021004516號-14
企業800網 · 提供技術支持