dreamwest Posted April 16, 2009 Share Posted April 16, 2009 I want to include my header and footer across all my subdomains. So my dominant domain will have the header and footer template stored there: http://www.site.com/templates/footer.tpl Now i need to include this file into my subdomain pages: http://sub.site.com/index.php So in index.php i want to include the footer.tpl page from my main domain Ive tried : include('http://www.site.com/templates/footer.tpl'); But it dosnt work Quote Link to comment https://forums.phpfreaks.com/topic/154317-include-file/ Share on other sites More sharing options...
trq Posted April 16, 2009 Share Posted April 16, 2009 include usually requires an absolute or realtive path noit a url. Quote Link to comment https://forums.phpfreaks.com/topic/154317-include-file/#findComment-811278 Share on other sites More sharing options...
MasterACE14 Posted April 16, 2009 Share Posted April 16, 2009 <?php include('templates/footer.tpl'); Quote Link to comment https://forums.phpfreaks.com/topic/154317-include-file/#findComment-811285 Share on other sites More sharing options...
dreamwest Posted April 16, 2009 Author Share Posted April 16, 2009 include usually requires an absolute or realtive path noit a url. Ok ill give it a go.... Quote Link to comment https://forums.phpfreaks.com/topic/154317-include-file/#findComment-811286 Share on other sites More sharing options...
dreamwest Posted April 16, 2009 Author Share Posted April 16, 2009 <?php include('templates/footer.tpl'); Thanks. But its not relivent to the subdomain. Ill try absolute path Quote Link to comment https://forums.phpfreaks.com/topic/154317-include-file/#findComment-811287 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.