如何上传远程图片啊,
include_once('upyun.class.php');
$fb=fopen('http://www.baidu.com/img/bdlogo.png','rb');
$filename='/video/test.jpg';
$upload = new UpYun('test', 'test', 'test123');
$upload ->writeFile("$filename", $fb, True);
fclose($fb);
我上传完报错什么原因呢,
回复内容:
include_once('upyun.class.php');
$fb=fopen('http://www.baidu.com/img/bdlogo.png','rb');
$filename='/video/test.jpg';
$upload = new UpYun('test', 'test', 'test123');
$upload ->writeFile("$filename", $fb, True);
fclose($fb);
我上传完报错什么原因呢,
已经解决了:
include_once('upyun.class.php');
$fb=file_get_contents('http://www.baidu.com/img/bdlogo.png');
$filename='/video/test.jpg';
$upload = new UpYun('test', 'test', 'test123');
$upload ->writeFile("$filename", $fb, True);
fclose($fb);
上一篇: Oracle性能监控常用基础脚本
下一篇: CentOS MySQL 启动错误