title: How to copy a file from one directory to another using PHP?
body: <p>Say I've got a file <code>test.php</code> in <code>foo</code> directory as well as <code>bar</code>. How can I replace <code>bar/test.php</code> with <code>foo/test.php</code> using <code>PHP</code>? I'm on Windows XP, a cross platform solution would be great but windows preferred.</p>