Jump to content

Archived

This topic is now archived and is closed to further replies.

hadoob024

Which dir is document root?

Recommended Posts

I have a quick question concerning the document root directory. All my PHP files are in the directory:

/var/www/html/


However, I also have several include files containing email addresses and MySQL login info in a separate directory. I was told that this is a good way to keep this information private and secure. These files are located in the following directory:

/var/www/includes/


Is this directory considered out of the document root? Or does the document root start at the "/var/www" level?

Share this post


Link to post
Share on other sites
You can use [code]echo $_SERVER['DOCUMENT_ROOT'];[/code] to find out what your server's document root is.

Share this post


Link to post
Share on other sites
Cool. Thanks man. Yeah, I think I knew what the answer was, I'm just getting paranoid here the closer we get to our launch date.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.