Help with rename() function
Hi,
I was wondering if someone can help me with this, I'm trying to make a website duplication application, where i store a website on my server and when someone fills in a form, it will copy the website and move it to a different folder on the server. I used the rename () function like this.
PHP Code:
<?php
$source = "original";
$destination = "new";
if (rename($source, $destination)) {
echo "Your Website Was Created.", "\n";
} else {
echo "Sorry, Your Website Was Not Created. Please try again.", "\n";
}
?>
and that works fine except i only end up with the folder "new", is there anyway to keep the original folder as well?
Thanks In advance:)