From 216eeb54b1f6cf35c48fc7ee0c786daa23ca9166 Mon Sep 17 00:00:00 2001 From: ONEXIN Date: Sat, 1 May 2021 21:44:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=9C=AA=E5=90=AF=E7=94=A8CURL=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/plugin/wechat/wechat.lib.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upload/source/plugin/wechat/wechat.lib.class.php b/upload/source/plugin/wechat/wechat.lib.class.php index 707531b53..869886451 100644 --- a/upload/source/plugin/wechat/wechat.lib.class.php +++ b/upload/source/plugin/wechat/wechat.lib.class.php @@ -427,6 +427,9 @@ class WeChatClient { } public static function get($url) { + if (!function_exists('curl_init')) { + return dfsockopen($url); + } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); # curl_setopt($ch, CURLOPT_HEADER, 1); @@ -447,7 +450,7 @@ class WeChatClient { private static function post($url, $data) { if (!function_exists('curl_init')) { - return ''; + return dfsockopen($url, 0, $data); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); -- Gitee