I am a bit familiar with PHP, although I am trying to work with a PHP script that I haven't really done before:
$src = "/home/user/public_html/test1";
$dest = "/home/user/public_html/test2";
shell_exec("cp -r $src $dest");
echo "Directory successfully created."; //output when done
rename("$dest","uniqid();");
This script is supposed to copy the files of a directory so that the newly created directory will be /home/user/public_html/test2/test1.
However, because this script is supposed to be used dynamically, I would like the rename function to rename the $dest to a uniqid(); function.
Can anyone compile a script for me that can do this or provide instructions on how to??
Thanks.