Enjoy an ad free experience by logging in. Not a member yet?
Register .
01-24-2004, 11:43 AM
PM User |
#1
Senior Coder
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
Day
Can anyone write me a php script which says "Today is " followed by the day?
01-24-2004, 11:50 AM
PM User |
#2
New to the CF scene
Join Date: Jan 2004
Location: Florence, AL
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
http://www.php.net/manual/en/function.date.php
This will have what you need. This is one of my most frequently looked up pages on the manual, I can't seem to remember alot of the date function's arguments, even though I use them nearly daily
01-24-2004, 12:02 PM
PM User |
#3
Senior Coder
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
I don't know any php but for what this is being used for it needs to be in php so can some write me a script.
01-24-2004, 12:04 PM
PM User |
#4
New to the CF scene
Join Date: Jan 2004
Location: Florence, AL
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Example 1 and 2 have full working lines of code. Just pick which way you want it to look.
01-24-2004, 12:30 PM
PM User |
#5
Senior Coder
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Today is <?php echo date("l"); ?>
01-24-2004, 12:35 PM
PM User |
#6
Senior Coder
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
Quote:
Originally posted by Nightfire
PHP Code:
Today is <?php echo date ( "l" ); ?>
So I just put that in the .php page I take it.
01-24-2004, 12:43 PM
PM User |
#7
Senior Coder
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
Yeah, just put it wherever you want it to show
01-24-2004, 02:50 PM
PM User |
#8
Senior Coder
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
Thanks
01-25-2004, 12:14 PM
PM User |
#9
Senior Coder
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
I have got this
Code:
<P><CENTER><FONT SIZE="+1" FACE="Arial">Today is <?php echo date("l"); ?> </FONT></CENTER></P>
but it is not working
01-25-2004, 12:29 PM
PM User |
#10
New to the CF scene
Join Date: Jan 2004
Location: Florence, AL
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Did you name the file index.php or pagename.php (whatever your page is named) instead of pagename.html?
01-25-2004, 01:09 PM
PM User |
#11
Senior Coder
Join Date: Jun 2002
Posts: 4,266
Thanks: 6
Thanked 48 Times in 48 Posts
And is php enabled on your server?
01-25-2004, 03:03 PM
PM User |
#12
Senior Coder
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
And is it on a server, not being viewed locally?
01-25-2004, 03:32 PM
PM User |
#13
Senior Coder
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
Quote:
Originally posted by gammahelixx
Did you name the file index.php or pagename.php (whatever your page is named) instead of pagename.html?
That's the problem, thanks!
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 07:43 AM .
Advertisement
Log in to turn off these ads.