public static function file_get_contents($url)
{
$ctx = stream_context_create(array(
'http' => array(
'timeout' => 3
)
)
);
$ret = file_get_contents($url, 0, $ctx);
return $ret;
}
php file_get_contents
原创
©著作权归作者所有:来自51CTO博客作者tinytail的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:php对象转数组
下一篇:php自定义配置文件的读取
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
使用file_get_contents下载图片
<?php /* 当你在搭建网站时,从远程服务器下载某张图片并且将其保存在自己的服务器上,这一操作会经常用到。
javascript html php -
file_get_contents遍历api数据
使用【bootstrap】框架关键代码:
html bootstrap postman php i++