diff --git a/upload/source/plugin/wechat/wechat.lib.class.php b/upload/source/plugin/wechat/wechat.lib.class.php index 707531b53cb330291fb71aef476bc7ba45f3cffe..86988645180d178908d9dcc276d8cbe3b8c0f126 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);