View Full Version : Accessing Files Outside The Document Root
03-11-2010, 11:53 PM
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.
03-12-2010, 05:37 AM
I don't think there is a global variable that contains that information. You might be able to use php define (http://php.net/manual/en/function.define.php) and then put the needed path there and then call it when you need it. Just a suggestion.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.