Mobile app version of vmapp.org
Login or Join
Nimeshi995

: PHP Clean Directory Is there a way to clean a directory using PHP after a certain amount of days? I'd like to put the amount of days into a $Cleanup variable? I've tried and not been able

@Nimeshi995

Posted in: #Directory #Php

Is there a way to clean a directory using PHP after a certain amount of days? I'd like to put the amount of days into a $Cleanup variable? I've tried and not been able to get it working.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shakeerah822

You would need to set a cron job (scheduled task) you set these via the server control panel or with ssh to the server.

You would basically make a script that contained the code to delete all items in the directory and tell the cron task the path of that script, then tell it to run periodically.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme