Forum und email

Error Handling and Logging Functions

Введение

These are functions dealing with error handling and logging. They allow you to define your own error handling rules, as well as modify the way the errors can be logged. This allows you to change and enhance error reporting to suit your needs.

With the logging functions, you can send messages directly to other machines, to an email (or email to pager gateway!), to system logs, etc., so you can selectively log and monitor the most important parts of your applications and websites.

The error reporting functions allow you to customize what level and kind of error feedback is given, ranging from simple notices to customized functions returned during errors.

Требования

Эти функции всегда доступны.

Установка

Для использования этих функций не требуется проведение установки, поскольку они являются частью ядра PHP.

Настройка во время выполнения

Поведение этих функций зависит от установок в php.ini.

Errors and Logging Configuration Options
Name Default Changeable Changelog
error_reporting NULL PHP_INI_ALL  
display_errors "1" PHP_INI_ALL  
display_startup_errors "0" PHP_INI_ALL Available since PHP 4.0.3.
log_errors "0" PHP_INI_ALL  
log_errors_max_len "1024" PHP_INI_ALL Available since PHP 4.3.0.
ignore_repeated_errors "0" PHP_INI_ALL Available since PHP 4.3.0.
ignore_repeated_source "0" PHP_INI_ALL Available since PHP 4.3.0.
report_memleaks "1" PHP_INI_ALL Available since PHP 4.3.0.
track_errors "0" PHP_INI_ALL  
html_errors "1" PHP_INI_ALL PHP_INI_SYSTEM in PHP <= 4.2.3. Available since PHP 4.0.2.
docref_root "" PHP_INI_ALL Available since PHP 4.3.0.
docref_ext "" PHP_INI_ALL Availa