Click to See Complete Forum and Search --> : Copy File Error


komang
07-02-2006, 10:36 PM
Hello,

why my code below have error?
<?php
copy("../images/awal/".$name,"../images/report_gallery/".$name);
?>

the error :
Warning: copy(../images/report_gallery/): failed to open stream: Is a directory in /home/breport/public_html/admin/copy_images_to_gallery.php on line 2

thanks for Your attention....

purefan
07-03-2006, 12:10 AM
have you checked for write permissions on the target folder?
also if the file already exists in the target folder there might be some issues...

NogDog
07-03-2006, 08:27 AM
From the "is a directory" part of the error message, I'm guessing that $name is not set or is empty.