PHP拿到接口数据返回的json以及传参-----ajax 跨域请求 ---

以下测试------

<php 
$ch = curl_init();
$str = '';//此处为接口地址以及传参-------
curl_setopt($ch, CURLOPT_URL, $str);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
// var_dump($output);
echo $output;
?>

  

结果 ------

猜你喜欢

转载自www.cnblogs.com/yaogengzhu/p/9937306.html
今日推荐