只下载过文本,图片怎么办?
$fp = fopen('logo.png', 'w'); fwrite($fp, file_get_contents('http://www.google.cn/images/nav_logo7.png')); fclose($fp);
或者
$content = file_get_contents('http://sstatic.net/so/img/logo.png') file_put_contents('logo.png', $content);
跟读文本是一样的:)
标签
查看
1352 次