Need to set up a mysqli error page

I am using a software that doesn't have a config file or error page file of any sort. I want to have a custom error page in case there's no connection to the database. What are my options? Can I create is mysqli connet with a die in it in the index file and then add a custom error page to it? Will it work?

from PHP http://ift.tt/1WiMbdT
via IFTTT
Previous
Next Post »
Thanks for your comment