2014-1021

GET方式的直接使用

$file_contents = file_get_contents('http://localhost/operate.php?act=get_user_list&type=json')


POST方式得用下面的(需要开启PHP curl支持)。

$url = 'http://localhost/operate.php?act=get_user_list&type=json';
$ch = curl_init ();
curl_setopt ( $ch, CURLOPT_URL, $u 阅读全文>>
                
标签: PHP调用接口GET和POST方法 PHP GET POST 阅读:12548