The error_log () function sends an error to the server error log, file, or remote target.
Error_log () is a debugging function of PHP, which is very good.
Definition and usage
The error_log () function sends an error to the server error log, file, or remote target.
If the call succeeds, true is returned. otherwise, false is returned.
Syntax
Error_log (error, type, destination, headers)
Parameters |
Description |
Error |
Required. The error message to be logged. |
Type |
Optional. Specifies the error record type. Possible record types:
- 0-default. According to the error_log configuration in the php. ini file, errors are sent to the server log system or file.
- 1-the error is sent to the address in the destination parameter. Only the headers parameter is used for this type.
- 2-send an error through the PHP debugging connection. This option is only available in PHP 3.
- 3-the error message is sent to the target string of the file.
|
Destination |
Optional. Specifies where to send an error message. The value of this parameter depends on the value of the "type" parameter. |
Headers |
Optional. It is only used when "type" is 1. Specify additional headers, such as From, Cc, and Bcc. Separated by CRLF (\ r \ n. Note: The From header must be included when an email is sent. You can use this parameter in the php. ini file. |
If type is 3, destination is the target path...