0

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

judy created at6 years ago view count: 2596
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);
6 years ago 回复
0

不行遇到报错:

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

6 years ago 回复

Recent search keywords