Forum Moderators: coopster

Message Too Old, No Replies

PHP Environment Variables

Need PHP to do what SSI does

         

FleaPit

7:27 pm on Jul 31, 2003 (gmt 0)

10+ Year Member



I have a new site scripted in PHP which I didn't write :) How can I recreate the SSI #echo var="DATE_LOCAL" variable using PHP?

Thanks to any one in advance :)

jatar_k

7:32 pm on Jul 31, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



take a look at the formatting section for the date function [php.net]

this may be what you need.

$today = date("F j, Y, g:i a");
echo $today;

[edited by: jatar_k at 8:05 pm (utc) on July 31, 2003]

FleaPit

7:40 pm on Jul 31, 2003 (gmt 0)

10+ Year Member



Thanks for that! The link didn't work but the code did :) Are there any other variables for the date and time?

Timotheos

8:04 pm on Jul 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmm.. the link works for me. Just go to www.php.net and search on date in the function list. Tons of info. Enjoy!

jatar_k

8:05 pm on Jul 31, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



try this one

[php.net...]

there are a whole bunch of functions for date and time formatting.

I have been having a little trouble with some of the geo specific links the last couple of days.

[edited by: jatar_k at 8:06 pm (utc) on July 31, 2003]

FleaPit

8:06 pm on Jul 31, 2003 (gmt 0)

10+ Year Member



Thanks guys, link works now and I have got more variables than I know what to do with!