Reputation:
I'm getting error while using php function copy()
Warning: copy() [function.copy]: Couldn't resolve host name in
Warning: copy(http://www.foodtest.ru/images/big_img/sausage_3.jpg) [function.copy]: failed to open stream: operation failed in
what's wrong with that url?
Upvotes: 3
Views: 14718
Reputation: 61
a little old, but important to pay attention, in case this helps someone who gets here:
copy command is folder-case sensitive, so if you try to copy 1.jpg from a folder called "ThumbImages" like that:
copy("thumbimages/1.jpg","[destination...]")
it will not find the folder.
notice you are using upper or lower case that matches the folder name
Upvotes: 0
Reputation: 304
Try plugging in a destination argument and make sure to have the soft ticks around the arguments.
copy("http://www.foodtest.ru/images/big_img/sausage_3.jpg", "./file.jpg");
Upvotes: 1