View Single Post
  #6  
Old June 10, 2002, 11:44 PM
Joel
 
Posts: n/a
Default Re: Any php Installers Here

Hi, Steve. I am a php programmer I was just being sarcastic as to not have to get technical. I felt like I was taking too much time on that topic lol

BUt what you posted is extremely helpful for any new programmer I wanted to laugh when I realized that was preventing some scripts to work. But since then, I make sure the php.ini error reporting has a standard setting so I never have to worry about that again, so long as I can control it. Sadly, some web hosts seem to be a bit picky about changing the php.ini ;)

Thanks

> If we define a variable that is a
> connection to the database:
> $db_something =
> @mysql_connect("yourhost",
> "database",
> "password");
> if (!$db_something) {
> echo( "(p)Unable to connect to the
> database.(/p)" );
> exit();
> }
> (brackets used in place of html angle
> brackets in code above)
> ... the "@" tells the function to
> fail silently and displays your
> custom error message rather then the MySQL
> default error message.
> There is a complete package you can
> download from sourceforge.net
> that you can double-click on and it will
> automatically install the Apache
> Server Software, PHP, MySQL, and PHPAdmin to
> test scripting on your local
> machine.
> Best Regards,
> Steve MacLellan
>