candleman98 Posted January 31, 2008 Share Posted January 31, 2008 Instead of changing footer files at the bottom of my web pages every year, I created a server side include file that would be placed at the bottom of my web pages, which requires pages to be saved as .shtml files. I also have code that will pull the year fom the sever, so I no longer hard code "copyright 2008" part of the code. My problem is how can I include both php code to pull the sever year, and a ssi file on the same page, when a page with php requires me to save the page as php and .ssi requires me to save the page as .shtml? I have code that works for both the .ssi file and the php code to get the server to display the year, but I can't get them to do it on the same page. Any suggetions? Thanks! {{{Candleman}}} Quote Link to comment Share on other sites More sharing options...
haku Posted January 31, 2008 Share Posted January 31, 2008 Just turn everything into a php file, and include your php files. You dont need anything else. Quote Link to comment Share on other sites More sharing options...
nethnet Posted January 31, 2008 Share Posted January 31, 2008 I'd suggest looking into virtual(). This is a function only supported when PHP is running as an Apache v2.0 or later module. Theo Quote Link to comment Share on other sites More sharing options...
candleman98 Posted January 31, 2008 Author Share Posted January 31, 2008 haku, Thanks for sending me down this road.... I changed my former .ssi file into a footer_php.php file. Then I removed the .ssi include that was in the index page, and replaced it with <?php require ("footer_php.php"); ?></p> Lastly I saved the index page as index.php and now I am getting both things I wanted.... a include footer file at the bottom of all my pages that I can modify dozens of pages in one site by just modifying the footer_php.php file, and secondly the year 2008 is not hard coded but is being pulled by the sever through this code: <? echo date("Y"); ?> As displayed here.... 2008 is not hard coded - http://www.webscopedesigns.com/index_php.php Thanks for the direction... {{{Candleman}}} 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.