folder ima dovoljne dozvole za upis.
function save_image($inPath,$outPath)
Code:
{ //Download images from remote server
$in= fopen($inPath, "rb");
$out= fopen($outPath, "wb");
while ($chunk = fread($in,8192))
{
fwrite($out, $chunk, 8192);
}
fclose($in);
fclose($out);
}
save_image('http://www.php.net/images/php.gif','image.gif');
i
function download_remote_file($file_url, $save_to)
{
$content = file_get_contents($file_url);
file_put_contents($save_to, $content);
}
download_remote_file('http://www.php.net/images/php.gif', realpath("./downloads") . '/file.gif');
{ //Download images from remote server
$in= fopen($inPath, "rb");
$out= fopen($outPath, "wb");
while ($chunk = fread($in,8192))
{
fwrite($out, $chunk, 8192);
}
fclose($in);
fclose($out);
}
save_image('http://www.php.net/images/php.gif','image.gif');
i
function download_remote_file($file_url, $save_to)
{
$content = file_get_contents($file_url);
file_put_contents($save_to, $content);
}
download_remote_file('http://www.php.net/images/php.gif', realpath("./downloads") . '/file.gif');
deWhite