();
if ($post) {
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch...);
curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
curl_setopt($ch, CURLOPT_HTTPHEADER,...(curl_error($ch));
return null;
}
curl_close($ch);...pwd' => '123456'];
$data = httpRequest($url, $params, true);
那么,在login.php就可以使用post方式获取username、pwd
get...id=123456';
$params = [];
$data = httpRequest($url, $params, false);
由于是get方式,将函数的第三个参数post置为false;同时要注意你的