Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Thanked 0 Times in 0 Posts

    Accessing Files Outside The Document Root

    Is their a $_SERVER variable that returns the path just above your document root? I'm thinking about putting my include files outside of my root folder, but I want to avoid going up (../) a directory each time I need a file. I checked PHP's $_SERVER documentation, but if there is a superglobal to accomplish this, I didn't realize what they were saying.

  2. #2
    Regular Coder
    Join Date
    Jan 2009
    Thanked 20 Times in 20 Posts
    I don't think there is a global variable that contains that information. You might be able to use php define and then put the needed path there and then call it when you need it. Just a suggestion.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts