为了账号安全,请及时绑定邮箱和手机立即绑定

file_get_contents()

Warning: file_get_contents(https//tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=18111111111): failed to open stream: No error in G:\wamp64\www\number\libs\ImHttpRequest.php on line 21

代码:

<?php

namespace libs;

class ImHttpRequest {

public static function request($url,$params = [],$method='GET'){

$response = null ;

if($url){

$method = strtoupper($method);

if($method == 'POST'){

}elseif($method == 'PUT'){

}elseif ($method == 'DELETE'){

}else {

if(is_array($params) and count($params) ){

if(strripos($url,'?')){

$url = $url.'&'.http_build_query($params);

}else {

$url = $url.'?'.http_build_query($params);

}

$response = file_get_contents($url);

}

}

}

return $response;

}

}

?>


正在回答

1 回答

举报

0/150
提交
取消
PHP实现手机归属地查询
  • 参与学习       27480    人
  • 解答问题       42    个

本php教程会带大家从0开始开发归属地查询WEB应用,很强势

进入课程

file_get_contents()

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信