I have a user form which I use to create a directory from the name entered on the form. I now need to copy file(s) from a different directory into this new directory. To sum it up, I need this to happen:
C:/inetpub/wwwroot/one_directory/AAAA/file.php copied to C:/inetpub/wwwroot/one_directory/New_Directory_I_Made . I have listed the code that I am using to make my directory but after much searching and trial and error I have not found any answers.
<?php
if (isset($_POST['submit'])) {
$name = $_POST['comp_name']; // name from form
mkdir ("c:/inetpub/wwwroot/private/$name");
mkdir ("c:/inetpub/wwwroot/private/$name/Projects");
}
?>
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks