Hi guys. This is the script I am using to move files from one folder to another.
PHP Code:$foldername=$_POST['foldername'];
if(!file_exists($foldername)) {
mkdir("$foldername/", 0777);
}
$source = '../files';
$dest= "$foldername";
$handle = opendir($source);
// Loop through all files in dir
while (false !== ($file = readdir($handle))) {
copy($file, $dest . '/' . $file);
}
closedir($handle);
}
The issue is it moves all the files over fine but the folders dont get moved over
What could cause this?
Regards
Chris





Bookmarks