bool error_log(string message, [int log_type], 
 [string error_destination], [string additional_headers]) 
message Error message
log_type Type of logging to use; defaults to syslog (0)
error_destination If the logging type is email or a file, the destinat ion address or filename
additional_headers If the logging type is email, additional email headers

Generates an error message and sends it somewhere.


TRUE on success; FALSE on failure or error


error_log() sends error messages to a variety of handlers, including custom log files, system logs, and email addresses. The function accepts from one to four arguments.

The first argument, message , contains the error message to be logged. This is the only required ...

Get PHP Functions Essential Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.