maccy93 Posted November 21, 2011 Share Posted November 21, 2011 ../ tells the php program to go up a level. require_once '../directory/somefile.php'; Is there a shortcut to go to the public web folder? For example. The following file is placed 3 folders deep: "var/www/deep/deeper/verydeep/index.php" and it requires a file with location: "var/www/thisfile.php" I there a short cut/ quicker method to?? require_once '../../../thisfile.php'; Quote Link to comment Share on other sites More sharing options...
requinix Posted November 21, 2011 Share Posted November 21, 2011 Try $_SERVER["DOCUMENT_ROOT"]. Quote Link to comment Share on other sites More sharing options...
maccy93 Posted November 21, 2011 Author Share Posted November 21, 2011 Ha! brilliant thank your very much. That will now safe me lots and lots of time! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.