How can I create a custom PHP/MySql error message?

A J

New member
I have spent hours Googling this before bothering you guys but am getting nowhere. I am looking for pages from a certain directory on my web server to NOT output the 'failed to connect to database' message that occurs when my site has an influx of hits. Instead I would like to totally control what the page displays in that eventuality.

Do I, for one thing, need a custom php.ini in that directory that turns standard error messages off? I want to display a completely customised message for this situation with none of MySql's or PHP's interference, and without sending users to another page than the one on which the connection failed because of high traffic.

If anyone knows of a quick solution or an example-ridden simple tutorial, I would be glad of it. I haven't done any web-development in years and I am trying to set up my site one time and then leave development behind, so I would rather not be pointed to books or references in the official manuals, if possible. Thanks in advance.
 
Back
Top