Re: Error handling (skip this message my mistake)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry,

i found the error. it was my mistake

----- Original Message ----
From: It Maq <itmaqurfe@xxxxxxxxx>
To: php-general@xxxxxxxxxxxxx
Sent: Tuesday, March 11, 2008 11:38:10 AM
Subject:  Error handling

Hi,

I need help with a simple script that i made for handling errors. The problem is that the script displays the same message several times while i want it displayed just one time.
He is the code:

<?php
function error_handler($errno, $errstr, $filename, $lineno, &$context)
{
    if ($errno == E_STRICT) {
        echo "you are in the function error_handler<br>";
        echo $errno. "<br>";
    }
}
set_error_handler(error_handler, E_STRICT);
ini_set('error_reporting', 0);

$conn = mysql_connect(localhost, root, iolfsyd) or trigger_error("connection au serveur failed",WARNING);

?>

Thanks




      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 






      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux