Place a file containing all your global sensitive stuff like db connect details outside (below) the web root. IE if your domain points to the folder /web or /www make another folder at that level and include() it into your actual scripts.
That way, the file is unreadable by anything except direct access on the server.