Jump to content

Old date displayed


madhu

Recommended Posts

I used the following code snippet and created header.php

 

I used the include option <?php include "header.php"; ?> to to display the date in other page.

 

Yesterday it displayed "Today is June 06, 2009" correctly. But today my system date is June 07 2009. But the pages still display "Today is June 06, 2009". Why it is displaying the old date. Please help me.

 

Code in header.php

<div align="center"><font size="4">Welcome to my movie review site!</font>

<br>

<?php

echo "Today is ";

echo date("F d");

echo ", ";

echo date("Y");

?>

</div>

Link to comment
https://forums.phpfreaks.com/topic/161236-old-date-displayed/
Share on other sites

Where is your PHP script being ran? If you are running it from your own computer it should be displaying your date. If you are running it from an external server, it will use that server's date. At the time of writing this, it is still June 6th here in the USA, so if you are being hosted by a USA server, then, that date being displayed is quite correct.

Link to comment
https://forums.phpfreaks.com/topic/161236-old-date-displayed/#findComment-850800
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.