php4 - ftping only todays files only -
I am new to php for files containing files for more than a week only to remove today's files only The task is, how do I select or filter files based on date and FTP in my local folder?
If you have a file name already, use
The file was last modified, or returned incorrectly on the failure. Time is returned as a Unix timestamp, which is appropriate for the date () function.
To compare today, you have the date ('Ym-d')
compared to today's date code ('ym-d', filemate ($ Filename)) To get the file name, you can use to read each one in turn.
& lt ;? Php if ($ handle = opendir ('/ path / to / files')) {resonance "directory handle: $ handle \ n"; Echo "files: \ n"; While (wrong! == ($ filename = readdir ($ handle))) {resonance "$ filename \ n"; } Close ($ handle); }? & Gt;
There is also one in the manual which should show you how to get a file once the FTP is done.
As such, by adding all this, you can find something:
Of course, you will need to fill the dummy values as appropriate.
Disclaimer : I typed it in Notepad ++ and it was not tested for any mistake!
Comments
Post a Comment