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 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. 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'); 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.... 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 Link to comment https://forums.phpfreaks.com/topic/154317-include-file/#findComment-811287 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.