📜  php 复制文件 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:37.995000             🧑  作者: Mango

代码示例4
$file = 'http://3.bp.blogspot.com/-AGI4aY2SFaE/Tg8yoG3ijTI/AAAAAAAAA5k/nJB-mDhc8Ds/s400/rizal001.jpg';
$newfile = '/img/submitted/yoyo.jpg';

if ( copy($file, $newfile) ) {
    echo "Copy success!";
}else{
echo "Copy failed.";
}