Hello all, using the following code:
$url = "http://www.xxxxxx.com/images/watermark_1.gif";
$file = substr(strrchr($url, "/"), 1 );
$des = "/home/xxxxxx/public_html/scart/images/";
$copy = copy($url, $des.$file);
if($copy){
echo "File copied.";
} else {
echo "Copy failed.";
}
I get the following error:
Warning: copy(/home/xxxxxx/public_html/scart/images/): failed to open stream: Is a directory in /home/xxxxxx/public_html/scart/show_csv.php on line 18
Any help getting this issue resolved would be great.
By the way, the source and destination files are on my server, but it still wont transfer. In the end, it will go from source as a URL and destination as a file anem on my server.
Thanks!
EDIT*
Fixed it...like an idiot, I had misnamed a variable.
/EDIT