莫名其妙的Parse error: syntax error, unexpected $end

 

之前的項目都沒有問題,重裝系統後發現:Parse error: syntax error, unexpected $end.找了半天,竟然忘了GOOGLE一下..原來是這樣哦,記錄一下.

在PHP文件中如果使用了<?來替代<?php標記PHP代碼的開始,並且php.ini中的short_open_tag應該爲On
short_open_tag = On

否則就會報異常:Parse error: syntax error, unexpected $end

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章