write date in file - major help needed
Posted: Mon Dec 22, 2008 10:52 pm
Can anyone help me with a script to write the date. Im using php4 and am stuck.
I have a script that adds a series of numbers and outputs it to a new file.
What I want is the output to be saved (appended) to an existing file (total.txt) and instead of simply providing the number, to also include a date stamp. So each day the output would be something like - 2008-12-22;238794
Over a series of days, the resulting total.txt would look like:
2008-12-22;238794
2008-12-23;525355
2008-12-24;636633
2008-12-25;455747
I have a script that adds a series of numbers and outputs it to a new file.
What I want is the output to be saved (appended) to an existing file (total.txt) and instead of simply providing the number, to also include a date stamp. So each day the output would be something like - 2008-12-22;238794
Over a series of days, the resulting total.txt would look like:
2008-12-22;238794
2008-12-23;525355
2008-12-24;636633
2008-12-25;455747