标签:span logs ret get tran code set field color
一、post传递数据
$ci = curl_init($url); curl_setopt($ci, CURLOPT_HEADER, 0); curl_setopt($ci, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ci, CURLOPT_POST, 1); curl_setopt($ci,CURLOPT_POSTFIELDS,$data); $return = curl_exec($ci); echo $return; curl_close($ch);
二、get传递数据
$url="www.baidu.com?id=1"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); echo $response;
标签:span logs ret get tran code set field color
原文地址:http://www.cnblogs.com/xiaobiaomei/p/7722953.html