Browse Source

Merge pull request #192 from binsee/patch

修复两个bug
dodge 10 years ago
parent
commit
d03829c891
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Thinkphp/EasyWechat.class.php
  2. 1 1
      wechat.class.php

+ 1 - 1
Thinkphp/EasyWechat.class.php

@@ -96,7 +96,7 @@ class EasyWechat extends Wechat
     private function checkDir($dir, $mode=0777) {
         if (!$dir)  return false;
         if(!is_dir($dir)) {
-            if (!file_exists() && @mkdir($dir, $mode, true))
+            if (!file_exists($dir) && @mkdir($dir, $mode, true))
                 return true;
             return false;
         }

+ 1 - 1
wechat.class.php

@@ -1802,7 +1802,7 @@ class Wechat
             'begin_date'=>$begin_date,
             'end_date'=>$end_date?$end_date:$begin_date
 	    );
-	    $result = $this->http_post(self::API_URL_PREFIX.self::$DATACUBE_URL_ARR[$type][$subtype].'access_token='.$this->access_token,self::json_encode($data));
+	    $result = $this->http_post(self::API_BASE_URL_PREFIX.self::$DATACUBE_URL_ARR[$type][$subtype].'access_token='.$this->access_token,self::json_encode($data));
 	    if ($result)
 	    {
 	        $json = json_decode($result,true);