Commit beb78e8a authored by mengweifu's avatar mengweifu

fix: httputil bug

parent 5f2c1cf1
......@@ -196,6 +196,11 @@ class HttpUtil
{
$ch = curl_init($url);
// CURLOPT_POSTFIELDS 不支持多维数组
if (is_array($post) && count($post) != count($post, COUNT_RECURSIVE)) {
$post = http_build_query($post);
}
if (is_resource($ch) === true)
{
curl_setopt($ch, CURLOPT_FAILONERROR, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment