PDA

View Full Version : Copy file command?


gorilla1
11-28-2002, 03:23 AM
In the code below, the directory rename works fine, as does the mkdir, but the cp (copy) file command does nothing... Why does the copy command fail to work?

$new_file = "/home/xxx/public_html/yyy/" . "11-27";
$old_file = "/home/xxx/public_html/yyy/Temp";
rename($old_file,$new_file) or "Error renaming file ($old_file)\n";


mkdir($old_file, 0777) || die "Cannot mkdir $old_file: $!";
$newloc = $old_file . "/";

$file1 = $new_file . "/.index.php3";
'cp $file1 $newloc' or "Error copying file ($newloc)\n";