brown2005 Posted February 19, 2009 Share Posted February 19, 2009 I am looking to have a network bar, over several websites, what is the best way to do this, so I can have just one file and include that? Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/ Share on other sites More sharing options...
The Little Guy Posted February 19, 2009 Share Posted February 19, 2009 What is a network bar? Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766535 Share on other sites More sharing options...
brown2005 Posted February 19, 2009 Author Share Posted February 19, 2009 well say i have.. mynetwork and in that network i have four sites. www.site1.com www.site2.com www.site3.com www.site4.com and each site has a bar at the top to easily link between the sites. Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766538 Share on other sites More sharing options...
The Little Guy Posted February 19, 2009 Share Posted February 19, 2009 are these sites on the same server? Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766541 Share on other sites More sharing options...
brown2005 Posted February 19, 2009 Author Share Posted February 19, 2009 99% sure they will be. Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766542 Share on other sites More sharing options...
dmccabe Posted February 19, 2009 Share Posted February 19, 2009 Cant you just include include a small header file on one of the site, the use php include on the rest of the sites? Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766543 Share on other sites More sharing options...
The Little Guy Posted February 19, 2009 Share Posted February 19, 2009 OK, then I would make a global file, outside of the root. Example: <a href="http://site1.com">Site 1</a> <a href="http://site2.com">Site 2</a> <a href="http://site3.com">Site 3</a> then in the page you want to add it to: <?php include '../navbar.php'; // Grabs the file outside the direcotry ?> Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766545 Share on other sites More sharing options...
Prismatic Posted February 19, 2009 Share Posted February 19, 2009 I had the same problem years ago and discovered an Apache setting that would include a file across any site you wanted... Unfortunately I cant find the trick anymore Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766636 Share on other sites More sharing options...
Mchl Posted February 19, 2009 Share Posted February 19, 2009 http://ekstreme.com/thingsofsorts/web-programming/php-auto-prepend-and-its-uses This will however make using sessions and headers in general a bit tricky Link to comment https://forums.phpfreaks.com/topic/146009-network-bar/#findComment-766656 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.