首页 > 代码库 > 采集课件等文档
采集课件等文档
function getwebcontent($url){
$ch = curl_init();
$timeout = 10;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$contents = trim(curl_exec($ch));
curl_close($ch);
return $contents;
}
$string = getwebcontent(‘http://202.97.3.101/IXC05b1e26cc036d03c3638fcfe274b31df_223.98.44.98/jast/kj/201707/2017%E5%B9%B4%E7%A7%8B%E5%86%80%E6%95%99%E7%89%88%E4%B8%83%E5%B9%B4%E7%BA%A7%E4%B8%8A2.2%E7%82%B9%E5%92%8C%E7%BA%BFppt%E8%AF%BE%E4%BB%B6.rar‘);
file_put_contents("./load/kejian.rar", $string);
路径名必须存在
采集课件等文档
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。