新的PHP7性能和安全提升了不少,用起也爽歪歪的。php
我也是一個吃螃蟹的人,把php5.4下的項目也遷移到 php7 下,問題也出了不少,但問題都屬於小問題,稍微修改就能夠在php7順溜的跑起。linux
此次遇到使用phpexcel 沒法導出Excel的問題,檢查了不少遍,本地和服務器都正確,配置也正確,惟一不一樣的是本地是windows,服務器是linux。windows
谷歌瀏覽器報CAUTION: Provisional headers are shown 警告後就無下文,控制檯也沒什麼信息輸出。瀏覽器
IE直接就報個 500錯誤,==> 有IE這個提示就說明 在服務端出了問題,安全
繼續跟蹤,抓包,哈哈哈 報服務器
'break' not in the 'loop' or 'switch' contextphp7
錯誤oop
位置在 性能
/phpexcel/Classes/PHPExcel/Calculation/Functions.php line 581;翻譯
刪除.... 文件正常導出!
下面翻譯成英文,也順便幫幫國際友人,由於在谷歌上也看到有相似問題,PHP7手冊中也沒找關於break在循環體外的問題說明。
同時phpexcel issue 又提不上去。
If you use phpexcel(1.8.0) in the Google browser under the "CAUTION: Provisional headers are shown" error. PHP environment is php7, please delete the "/PHPExcel/Calculation/Funcionts.php" in the 581st line of the "break;". Because the "break" key words in the php7, must be in the while, loop and other circulating in the body