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

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;

}

}

?>


正在回答

0 回答

举报

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

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

进入课程

file_get_contents()

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号