file_get_contents 多参数

来源:互联网 发布:御姐控 知乎 编辑:程序博客网 时间:2024/06/07 02:39
//禁止缓存header("Expires:Mon,26Jul199705:00:00GMT");header("Pragma:no-cache");//设置编码header("Content-Type:text/html;charset=utf-8");//获取远程文件内容function readtemp($tempurl){$opts=array('http'=>array('method'=>'GET','timeout'=>500));   $context=stream_context_create($opts);  //创建输入流@$temphtml=file_get_contents($tempurl,false,$context) or die("文件不存在:".$tempurl);return $temphtml;}//输出内容echo <span style="font-family: Arial, Helvetica, sans-serif;">readtemp('http://xxx.com');</span>

0 0
原创粉丝点击