how to create a backup of a file once the current one is changed using php
<p>I'm playing around with file info in php and i'm wondering if its possible to do the following:</p>

<p>once a file is changed get the contents of the file,
then put the contents of the file into another file.</p>

<p>kinda like a "backup system" so once you make a change to the file a duplicate one is created, each change to the original file overwrites the duplicate one.</p>

<p>i'm trying to do this with storing the time in the db, is this possible? i don't know what there is to test against?</p>

<p>more clearly, i would like to do the following:
execute a script once a specifeced file is changed on the server</p>
