- Impact
- 1,429
hey everyone...so here is what i'm trying to do.
I plan to setup a cron job which will run once every night. The cron will call a PHP file that should count the number of lines in a text file. Once the number of lines reaches X (for example, 75) it would then either remove the text file and recreate it - or just wipe the file clean and remove all 75 lines.
I'm not too good with PHP programming but I did find some code to count the number of lines. What i'm having problems with now would be the if statement that remove the file or the lines...Any help or links to a good tutorial would be nice!
I plan to setup a cron job which will run once every night. The cron will call a PHP file that should count the number of lines in a text file. Once the number of lines reaches X (for example, 75) it would then either remove the text file and recreate it - or just wipe the file clean and remove all 75 lines.
I'm not too good with PHP programming but I did find some code to count the number of lines. What i'm having problems with now would be the if statement that remove the file or the lines...Any help or links to a good tutorial would be nice!