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 Quote 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'); Quote 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? Quote 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'; Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.