Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2004-09-12, 01:20 AM   #1
Bill
Selling porn allows me to stay in a constant state of Bliss - ain't that a trip!
 
Join Date: Apr 2003
Posts: 3,914
Most compact way to display todays date on a page?

The topic pretty much says it - I'm looking for the most compact scripting to display todays date on a page.

The javascript stuff seems pretty bulky, is there some way to do it that doesn't take multiple lines of script?
Bill is offline   Reply With Quote
Old 2004-09-12, 02:09 AM   #2
Wazza
I'm a jaded evil bastard, I wouldn't piss on myself if I was on fire...
 
Join Date: Apr 2003
Location: Melbourne, Australia
Posts: 808
Send a message via ICQ to Wazza
http://www.ssi-developer.net/ssi/ssi-date.shtml
__________________
I sale Internet

My sites have no traffic and no PR - let's trade - PM me
Wazza is offline   Reply With Quote
Old 2004-09-12, 08:13 AM   #3
Ramster
Life is good
 
Ramster's Avatar
 
Join Date: Apr 2003
Location: Ottawa, Canada
Posts: 11,867
Send a message via ICQ to Ramster Send a message via AIM to Ramster
That'll pretty well do it.
__________________
Pornstar Legends | Live Cam Model Shows | Hungarian Girls
Skype: robmurray999
Ramster is offline   Reply With Quote
Old 2004-09-13, 08:18 AM   #4
AcidMaX
Programming till my fingers bleed.
 
AcidMaX's Avatar
 
Join Date: Aug 2003
Location: Michigan
Posts: 876
Or for PHP you can use something like

<?php echo date("m/d/Y"); ?>
AcidMaX is offline   Reply With Quote
Old 2004-09-13, 03:14 PM   #5
Bill
Selling porn allows me to stay in a constant state of Bliss - ain't that a trip!
 
Join Date: Apr 2003
Posts: 3,914
Two beautiful methods, thanks much Wazza and Acidmax!

I'm a little more familiar with ssi than php, is there anything special that I have to do to get the php method to display on an html page?

(I know that to use the ssi method I have to insert the entries into htaccess to get ssi to display on an html page. I'm guessing there's a similar htaccess entry for php...)
Bill is offline   Reply With Quote
Old 2004-09-13, 03:27 PM   #6
AcidMaX
Programming till my fingers bleed.
 
AcidMaX's Avatar
 
Join Date: Aug 2003
Location: Michigan
Posts: 876
If php is installed on your webserver (it is on the majority out there). Just save the file with a .php extension and put that code where you want the date and you are all set.

Andy
AcidMaX is offline   Reply With Quote
Old 2004-09-28, 08:57 AM   #7
Opti
I Didn't Do It
 
Opti's Avatar
 
Join Date: Aug 2003
Location: au
Posts: 795
Send a message via ICQ to Opti
Quote:
Originally posted by Bill
Two beautiful methods, thanks much Wazza and Acidmax!

I'm a little more familiar with ssi than php, is there anything special that I have to do to get the php method to display on an html page?

(I know that to use the ssi method I have to insert the entries into htaccess to get ssi to display on an html page. I'm guessing there's a similar htaccess entry for php...)
this line in .htaccess will make all .html pages be parsed for php

AddType application/x-httpd-php html

or you can force for a particular file like this

<Files filename.html>
ForceType application/x-httpd-php
</Files>
Opti is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:19 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc