file exist

A

Anonymous

Guest
can PHP perform the task that run the page only once a year, something like check the file has run before, if yes, then show message that the page already run, if not, run the script.
thank you for help.
 
You could do something like this

Check when last update was made
- When an update is made, write to a file with a unix timestamp

If last update was more than a year ago then update
- if (($LastUpdate + 1yearinseconds) <= time())
 
i'm not familiar & understand with timestamp, how does it works? :wink:
 
All related documentation is here:
http://es.php.net/manual/en/ref.datetime.php

Have a look, there are many good examples and explanations.
 
Back
Top