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'; Link to comment https://forums.phpfreaks.com/topic/251572-shortcut-back-to-the-web-public-folder/ Share on other sites More sharing options...
requinix Posted November 21, 2011 Share Posted November 21, 2011 Try $_SERVER["DOCUMENT_ROOT"]. Link to comment https://forums.phpfreaks.com/topic/251572-shortcut-back-to-the-web-public-folder/#findComment-1290166 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! Link to comment https://forums.phpfreaks.com/topic/251572-shortcut-back-to-the-web-public-folder/#findComment-1290175 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.