|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I need 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=Ahu06i...Dypao8Wcj9tAcJ |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
It Maq wrote:
> Hi, > > I need 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=Ahu06i...Dypao8Wcj9tAcJ > Do the erors have anything to do with string expected assuming constant or similar? Maybe you have multiple errors because you don't quote your strings? -Shawn |
|
![]() |
| Outils de la discussion | |
|
|