PHP 将图像从远程服务器复制到本地

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP 将图像从远程服务器复制到本地相关的知识,希望对你有一定的参考价值。

<?php
function save_image($inPath,$outPath)
{ //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);
}
?>

以上是关于PHP 将图像从远程服务器复制到本地的主要内容,如果未能解决你的问题,请参考以下文章