hi all
i need to code a php file to be called by a cron job to do rotate 2 files in the server.
it should be something like this:
say i have the 2 files called aaa.php and bbb.php
so the script should do this:
copy (clone) aaa.php to ccc.php (at this moment we have 3 files)
rename bbb.php to aaa.php (bbb overwrites aaa)
rename ccc.php to bbb.php (it finished rotating the 2 files)
in the next cron it will do the same so bbb will become aaa and so on
i dont know if there is a easier way to do that, i just thought that this is a logical way
can someone help me coding this? I even dont know how to start
:bemused: :bemused: :bemused:
thanks in advance