$header = [ 'client:h5', 'token:test', ]; curlRequest($url, $params, true, 10, $header); PHP5.1.3版以上支持用curl_getinfo函数来获取请求头具体需要先设置 curl_setopt($ch, CURLINFO_HEADER_OUT, true);然后在请求发生后用 curl_getinfo($ch, CURLINFO_HEADER_OUT); function curlRequest($url…