Вопрос

PHP5.4

php.ini:

log_errors = On
error_log = /tmp/log.txt
error_reporting=E_ALL

and now that code as:

<?php
@asdfasdfxxxasdfas();
?>

the error can't logged in /tmp/log.txt

Это было полезно?

Решение

Because you are used Error Control Operators, from PHP Manual:

Currently the "@" error-control operator prefix will even disable error reporting for critical errors that will terminate script execution. Among other things, this means that if you use "@" to suppress errors from a certain function and either it isn't available or has been mistyped, the script will die right there with no indication as to why.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top