0

PHP 怎样 CURL 使用 http/2 POST提交数据

judy created at5 years ago view count: 2379
report
回复
0

设置下就行了。

if (!defined('CURL_HTTP_VERSION_2_0')) {
    define('CURL_HTTP_VERSION_2_0', 3);
}

$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
5 years ago 回复
0

不行遇到报错:

HTTP/2 client preface string missing or corrupt. Hex dump for received bytes:

5 years ago 回复

Recent search keywords