2010-08-24 14 views

回答

1

奇,php -l報告錯誤,對我蠻好。 test.php的測試腳本:

<?php 
    random_function_name('blah); 
           ^--- missing closing quote 

給我:

[email protected]:~/z$ php -l test.php 
PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in test.php on line 2 
Errors parsing test.php 
[email protected]:~/z$ 

檢查error_reportingdisplay_errors設置,並確保不被supressed錯誤。

+0

謝謝,它一定是我的php.ini設置。 – Tom 2010-08-25 23:37:17

+0

爲避免使用錯誤的'error_reporting'定義,可以使用'php -nl test.php'。 '-n'代表'不會使用php.ini文件 – Bathz 2014-02-28 11:15:42