Forum Moderators: coopster

Message Too Old, No Replies

PHP include files outside the document tree

Should I and how do I configure apache PHP

         

syndeticFT

8:55 pm on Mar 11, 2005 (gmt 0)

10+ Year Member



I have an Apache - Mysql - PHP server.

My PHP scripts have to connect to Mysql which means that they have a user name and password shown in them. At present, these scripts are inside the htdocs document tree.

I think that it would be better if I had a small script ouside the htdocs document tree that contained the user name and password for mysql and that did the logging in function.

Is this a correct assumption and if so, how do I do it. Is there a apache.conf or php.ini line that needs to be changed?

THanks.

badone

12:28 am on Mar 12, 2005 (gmt 0)

10+ Year Member



Just use the full file system path when you include the file.

e.g.
include_once( '/path/to/file/you/wish/to/include' );

HTH,
BAD