Welcome to CGI City - One of the biggest WWW Resources for CGI and Perl materials
Tips and Tutorials
How do I insert the date and time into my HTML pages?

Here's a simple way - first, create the following Perl source code to handle the date and time function (you can actually just cut and paste):

Save the file under any name you want. For example, you may call it date.pl. Upload it to your cgi-bin using your favorite ftp program, then chmod it to 755 to make it executable.

Now to insert in into your HTML page. You will need server side includes (SSI) in order to place the output of the above code into your HTML file. Simply insert the following code fragment into your HTML file:

<!--#exec cgi="cgi-bin/date.pl"-->

Of course you need to correctly specify the relative path to where you placed the file.


Back to Tips and Tutorials

Search For:
Quick jump to
Home | About Us | Contact Us | Link To Us | Search
Tips & Tutorials | References | Books | Add A Resource
Custom Programming Services | Advertise
Disclaimer | Privacy Policy

Copyright © 1998-2099    CGI City    All Rights Reserved
All original materials contained herein including text, images, and original scripts written by CGI City, are copyrighted by CGI City. All other scripts and materials are copyrighted by their respective authors/owners.