soggy Posted July 4, 2008 Share Posted July 4, 2008 <?php include 'http://www.anysite.com/credits.php'?> The above code works fine, but is there a way to pull it without listing http://www.anysite.com? The page pulling the file is a couple of directories lower in anysite.com/folder1/folder2/folder3/footer.php and the file it is pulling is in the root folder for that domain Also let me state that the domain name is an addon domain but not a sub domain thanks in advance Link to comment https://forums.phpfreaks.com/topic/113163-php-include-from-main-folder-on-shared-host/ Share on other sites More sharing options...
Bendude14 Posted July 4, 2008 Share Posted July 4, 2008 if you are trying to take it from a lower directory you can use ../../ to move back directories i often use $_SERVER['DOCUMENT_ROOT'].'/folder1/' this starts your link in the root directory Link to comment https://forums.phpfreaks.com/topic/113163-php-include-from-main-folder-on-shared-host/#findComment-581448 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.