[thelist] php settings for DB access

Ben Phillips ben at inchima.com
Wed Aug 14 07:33:00 CDT 2002


> You could move the connection info outside the web document
> tree and include it in your php scripts using an absolute path...e.g.
>
> Web server root is /home/httpdocs so you put config file in
> /home/phpconfigs and your scripts
> include('/home/phpconfigs/whatever.php');
> NB If you have to run PHP with open_basedir and safe_mode
> enabled then this won't work

if you can't put anything outside the web document tree and you are
using apache, then simply name the include file .whatever.php. apache
will never send anything beginning with a . (full stop/period) afaik, so
it can't be downloaded, but can be included.

benji
inchima.com





More information about the thelist mailing list