How to use error log in PHP

This article describe about error_log() function in PHP.
  • 1642

error_log() function

The server error log a file or remote destination return by the error_log() function.

Return True if complete successfully otherwise false.

Syntax

error_log( error, type, destination, headers)

 

Example

 

<html>
<body>
<?php
$test=2;
if ($test>1)
{
error_log("A custom error has been triggered",1,"[email protected]","From: [email protected]");
}
?>
</body>
</html>

 Output

pic18.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.