Hello:
I have a batch file in PHP I want to run once per day. The batch file is called by another file.
This other file creates a new day file, filename below and then runs the batch file.
Todays Filename: 20071023 (this is the format i use for the file name)
The batch file when ran would take 20071022 and do something with it.
What is the most efficient way of finding out yesterdays file name?
Any help with this question is appreciated. Thanks in advance.
Jason
P.S. I am using a linux server for php code.
Finding Yesterday
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
$filename = date('Ymd', strtotime('yesterday'));