2014-12-22 94 views
0

我有PHP 29年3月5日安裝和嘗試讀取一個excel與php-excel-reader-2.21文件,但它給出瞭如下錯誤讀取Excel在PHP

Fatal error: Maximum execution time of 300 seconds exceeded in php-excel-reader-2.21\excel_reader2.php on line 143 

還試圖用phpExcelReader,它提供瞭如下錯誤。

Fatal error: Maximum execution time of 300 seconds exceeded in C:\Apache2.2\htdocs\phpExcelReader\Spreadsheet\Excel\Reader\oleread.php on line 96 

上最大時間限制的工作可能不會在這裏有幫助的,因爲我只有2行中的Excel文件和該值改爲「300」我已經設置已經很高了。任何人都有想法,爲什麼圖書館沒有閱讀優秀?或者其他建議?

+0

任何有關該錯誤消息不明確? – PeeHaa

+0

也可能的愚蠢:http://stackoverflow.com/questions/17176773/fatal-error-maximum-execution-time-of-30-seconds-exceeded-in-c,http://stackoverflow.com/questions/23709161 /最大執行時間爲300秒,超過了pcntl-fork,http://stackoverflow.com/q/5164930/508666,http://stackoverflow.com/q/22421876/508666,http ://stackoverflow.com/q/23556519/508666 – PeeHaa

+0

問題不是關於最大執行時間的工作,因爲我只有2行用於讀取,所以我設置的值已經很高。我想了解爲什麼指定的庫無法讀取excel,否則任何其他庫的建議都會有所幫助。 –

回答

1

在你的php.ini文件中有一個指令max_execution_time,將其改爲你想要的。

OR

在你的PHP腳本

,寫下面一行:

ini_set('MAX_EXECUTION_TIME', -1);