funtion request(){
echo "Success";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, $request_timeout);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $request_timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$curl_error = curl_errno($ch);
$getserver = curl_getinfo($ch);
curl_close($ch);
}
这里的成功回声只显示后消除卷曲函数。我想在 curl 函数调用之前回显成功消息。
侃侃无极
萧十郎