file_put_contents('image.jpg',file_get_contents('http://static.adzerk.net/Advertisers/12f0cc69cd9742faa9c8ee0f7b0d210e.jpg'));
This works fine - save the file in the current folder, but if I try:
file_put_contents('/subfolder/image.jpg',file_get_contents('http://static.adzerk.net/Advertisers/12f0cc69cd9742faa9c8ee0f7b0d210e.jpg'));
then I have an error:
Could not open stream: no such file or directory in
etc.
why? How to save this in a subfolder?
source share