Jump to content


Photo

Which dir is document root?


  • Please log in to reply
2 replies to this topic

#1 hadoob024

hadoob024
  • Members
  • PipPipPip
  • Advanced Member
  • 192 posts

Posted 02 March 2006 - 07:50 PM

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?

#2 kanikilu

kanikilu
  • Members
  • PipPip
  • Member
  • 29 posts
  • LocationDallas, TX

Posted 02 March 2006 - 09:29 PM

You can use
echo $_SERVER['DOCUMENT_ROOT'];
to find out what your server's document root is.

#3 hadoob024

hadoob024
  • Members
  • PipPipPip
  • Advanced Member
  • 192 posts

Posted 03 March 2006 - 12:27 AM

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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users