Your webserver reads all it's pages and scripts from one directory on the server. That is the 'documentroot'.
The webserver cannot read files that are not in that directory or in a subdirectory of that directory.
PHP However can read files that are 'outside the documentroot'.
Therefore, putting your passwords in a file outside the documentroot means only PHP can read it, and hackers cannot get the file by entering it's name in the URL.
A forum, a FAQ, email notification, what else do you need?