![]() |
curl and php file downloading - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: curl and php file downloading (/showthread.php?tid=49843) |
curl and php file downloading - El Forum - 03-05-2012 [eluser]peekk[/eluser] Hi, I've got one problem. I want to download remote image using curl. To do this i'm using these isntructions: Code: <?php but it says that there is no such file or directory in (and this is weird) home/username/localhost/.. it gives the full system array to my localhost folder. Why? When I'm doing this by: Code: file_put_contents('img.jpg',file_get_contents('http://example.com/img.jpg')); Edit: ofc i know, that variable dirname(__FILE__) contains my full system path - but why? How can I do it same as in PHP without entering the full system path? Regards! |