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? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted February 19, 2009 Share Posted February 19, 2009 What is a network bar? Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
brown2005 Posted February 19, 2009 Author Share Posted February 19, 2009 99% sure they will be. Quote Link to comment 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? Quote Link to comment 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 ?> Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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.