If you disable display_errors
in php.ini
, and later enable it in your PHP script using ini_set()
, it will only be enabled after the line containing that ini_set()
call has been executed.
Parse errors occur before the PHP script even starts -- when the PHP file is parsed (hence the "parse error" name).
Which means they occur before your ini_set()
has even a chance of being executed -- which means that, in your case, display_errors
is not enabled when the parse error occurs ; and, as a consequence, you don't get anything displayed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…