copy and paste file...solved
Posted: Sat Sep 05, 2009 8:43 pm
Hey guys I just want to copy and paste a picture but my function is not working, the page just executes without doing anything. no error messages or anything. Any ideas would really help me. Thanks.
Code: Select all
$src='../../images';
$dest='../../usercontent/$username/images';
$fsrc = fopen($src,'r');
$fdest = fopen($dest,'w+');
$file = '../../images/defaulticon.png';
$newfile = '../../usercontent/$username/images/defaulticon.png';
copy($file, $newfile);
fclose($fsrc);
fclose($fdest);
header("Location: ".$session->referrer);