Web Analytics Made Easy -
StatCounter PHP Time error - CodingForum

Announcement

Collapse
No announcement yet.

PHP Time error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Time error

    Hi

    I have this code, but when the script runs the time which it echos is an hour behind, so if it ran now, it would say 8:38 also how would I get the time to stay the same so that when the page is refreshed the time doesnt change, I would like this to be possible but my main problem is the hour behind?

    Code:
    echo "file <a href=\"".$_POST["Nameoffile"].".txt\">".$_POST["Nameoffile"].".txt</a>
    was last modified: " . date ("F d Y H:i:s.", filemtime($file));

  • #2
    Check date_default_timezone_set

    Comment


    • #3
      bilal

      you use php current time function

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎