A nice way to move them out of the way, is to put the data in a directory outside of the web server's document root, so it can't be browseable, then add that directory to the php.ini file as an include directory and include it from there.
Otherwise, if it's in the path of the web server's doc root then it's still accessable via the web server, possibly.
what I usually do is put the name, pwd, etc in a file that has a wrapper for the dbname_connect() function and returns the handle, and put that out of the way, so every php script can just include it and do something like:
$conn = myconn();
and they're done.