PHP实现从远程下载文件的方法
$file = date('YmdHis').".js"; //文件保存路径$jsCon = file_get_contents("
http://localhost/1.js
"); //获取远程文件内容file_put_contents($file, $jsCon); //写入到本地文件$file = date('YmdHis').".js"; //文件保存路径$jsCon = file_get_contents("
http://localhost/1.js
"); //获取远程文件内容file_put_contents($file, $jsCon); //写入到本地文件
还没有评论,来说两句吧...