I want to move all files from one folder to other. my code is as following. in this I made a folder in which i want to copy all file from templats folder
$doit = str_replace(" ", "", $slt['user_compeny_name']); mkdir("$doit"); $source = "templat/"; $target = $doit . "/"; $dir = opendir($source); while (($file = readdir($dir)) !== false) { copy($source . $file, $target . $file); } It working fine . copy all files but give warning that The first argument to copy() function cannot be a directory
can any one help me asap