home / experts / javascript / column2 |
|
You can use server-side includes in various ways to display the date on a Web page. However, we do not recommend this method, because server-side includes increase the time it takes users to access your Web pages. Furthermore, turning on server-side includes may pose a security risk to your system. If you decide to use a server-side include to display the date, despite the disadvantages, you must make sure they are turned on. For more information on enabling server-side includes, check out the NCSA HTTPd documentation. The first step is to create a CGI (Perl) script that prints the date in the desired format. Simply copy the following code and paste it in a text file named
Now add the following code segment (a "server-side include") to your HTML document:
You should enter the virtual path to the script ( |
Created: September 11, 1997
Revised: April 7, 1998
URL: http://www.webreference.com/js/column2/include.html