Open file, replace string save in different Directory
<p>Looking for a simple way to open a source php file, replace some predefined tags, then save the file in a different directory.  I am looking for a way to do it without copying the file to a tmp dir, replacing tags, then copying the file again.  </p>

<p>Is there a way to do this in one quick pass?</p>
