Re: error-catching

From: Date: Thu, 09 May 2002 18:32:33 +0000
Subject: Re: error-catching
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-96855@lists.php.net to get a copy of this message
Gert, to prevent PHP to output any error messages, you can prefix the expression with @, i.e. $db = @mysql_connect( $host, $user, $password) or die ('Sorry, server is down!'); Greetings, Herb ----- Original Message ----- From: "Gert Mellak" <gert@mellak.com> To: <php-general@lists.php.net> Sent: Thursday, May 09, 2002 4:00 PM Subject: [PHP] error-catching > Hi! > > When I open a database connection and i. e. the db-server is down, > I get a very long, long error message telling me that the server is down. > > What I want to do is just echo a text, i. e. "DB-Server down" and leave out > the error message. > > Does anyone have an idea how to manage this?

« previous php.general (#96855) next »