Send an error to the server error log, a file or a remote destination in PHP

Description

The following code shows how to send an error to the server error log, a file or a remote destination.

Example


//from  w  w w  .  java  2  s. com
<?php
$test=2;

if ($test>1){
  error_log("A custom error has been triggered",1,"someone@example.com","From: webmaster@example.com");
}
?>




















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions