ontwerpexpert.nl Posted May 12, 2009 Share Posted May 12, 2009 Hi, I am wrestling with this for days, I hope someone can help. Situation: In the root of my server stands my website, index.php, footer and so on. Now I have some applications like a forum, chat and more thats placed in httpdocs/forum/index.php What I want I need them to include the footer from the root folder.. just they dont include them... is there a solution? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/157785-solved-include-file-from-a-different-folder/ Share on other sites More sharing options...
gevans Posted May 12, 2009 Share Posted May 12, 2009 if you need to go up a i directory use '../' so your website's forum (for example) www.example.com/forum/index.php index.php needs to include the footer (www.example.com/footer.php) include('../footer.php'); Link to comment https://forums.phpfreaks.com/topic/157785-solved-include-file-from-a-different-folder/#findComment-832237 Share on other sites More sharing options...
ontwerpexpert.nl Posted May 12, 2009 Author Share Posted May 12, 2009 I know It just dont work for some reason. I tried the ../ path and the complete http://..... Maybe it's just the index of Phpbb that wont include it? Link to comment https://forums.phpfreaks.com/topic/157785-solved-include-file-from-a-different-folder/#findComment-832317 Share on other sites More sharing options...
Adam Posted May 12, 2009 Share Posted May 12, 2009 You may have some configuration forcing it not to work. Try: include './../footer.php'; Link to comment https://forums.phpfreaks.com/topic/157785-solved-include-file-from-a-different-folder/#findComment-832321 Share on other sites More sharing options...
ontwerpexpert.nl Posted May 12, 2009 Author Share Posted May 12, 2009 Solved Thanx Link to comment https://forums.phpfreaks.com/topic/157785-solved-include-file-from-a-different-folder/#findComment-832343 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.