i'm trying to copy a file from one directory to another
here's my script so far...
but i get the following error...
Warning: copy(/Library/WebServer/Documents/folder/new/) [function.copy]: failed to open stream: Is a directory in /Library/WebServer/Documents/...../test.php on line 14
where am i going wrong?
here's my script so far...
Code:
$path_source = ''.$_SERVER[DOCUMENT_ROOT].'/folder/original/';
$path_destination = ''.$_SERVER[DOCUMENT_ROOT].'/folder/new/';
$file = ''.$path_source.'image.jpg';
copy($file, $path_destination);
but i get the following error...
Warning: copy(/Library/WebServer/Documents/folder/new/) [function.copy]: failed to open stream: Is a directory in /Library/WebServer/Documents/...../test.php on line 14
where am i going wrong?