|
Advanced HTML |
Including common files in your pageA very useful technique for making it easier to create web sites is to have common elements such as menus, headers and footers in separate files which are then included into your main web pages. This has a number of advantages.
Below is a simplified version of what my menu-links.inc contains. Each time I update the menu all the pages on this site are automatically updated.
For this to work you just need menu-links.inc to be in the same directory as your .html or .php files.<A HREF="/index.html"> <IMG SRC="/advancedhtml.gif"> </A> <P> <FONT SIZE="-1" FACE=ARIAL> <A HREF="/advancedhtml.htm"">Advanced HTML</A><BR> <A HREF="/tables.htm"">Tables</A><BR> <A HREF="/frame.htm"">Frames</A><BR> <A HREF="/password.htm"">Passwords</A><BR> <A HREF="/colours.htm"">HTML Colours</A><BR> <A HREF="/webspace.htm"">Buying Webspace</A><BR> </FONT> </P> Keeping your copyright footer up to date automaticallyImagine that in 2007 you create a webpage and you add a copyright footer. Time passes and we reach 2008. The problem is that your copyright footer is now out of date. There is an easy way to sort this out. Use some simple PHP to keep the current year up to date.If the current year is 2007 then the output will be 'Copyright © 1997 - 2007'.<CENTER> <FONT SIZE="-2" FACE="Arial"> <?php $today = getdate(); print "Copyright © 1997 - ".$today["year"]; ?> </FONT> </CENTER>
Copyright © 1997 - 2008 Hosted by 1&1
|