Explorar o código

debug wx author

stanley-king %!s(int64=8) %!d(string=hai) anos
pai
achega
fb9426f74e

+ 2 - 1
helper/fcgi_server.php

@@ -22,7 +22,7 @@ class fcgi_server
     {
         static $exfiles = array('wxnotify.php','alipay_notify_url.php','dispatch_notify.php','kdniao_notify.php',
             'cmbpay_notify.php','cmbpay_sign.php','api/wxLogin/index.php','api/wxLogin/callback.php',
-            'test.php',);
+            'test.php');
 
         $path = BASE_ROOT_PATH . '/mobile/';
         $file = str_replace($path,'',$file);
@@ -96,6 +96,7 @@ class fcgi_server
                 session::instance()->start();
 
                 $file = request_helper::script_file();
+                Log::record("file={$file}",Log::DEBUG);
                 if(file_exists($file))
                 {
                     if(self::is_exclude($file))

+ 2 - 1
mobile/api/wxLogin/callback.php

@@ -69,7 +69,8 @@ if(!empty($user['errcode'])) {
 $_SESSION['wxopenid'] = $user['openid'];
 $_SESSION['uface']    = $user['headimgurl'];
 $_SESSION['uname']    = $user['nickname'];
-header('location:../login.php');
+
+header('location:');
 
 function myCurl($url, $type = 'GET', $data = null){
     $curl = curl_init();

+ 1 - 1
mobile/api/wxLogin/config.php

@@ -10,6 +10,6 @@ define('appID'           ,   'wx6b42e00ecaade538');
 //appsecret
 define('appsecret'       ,   'ee64233b3144d76217161666f8cb4c86');
 //微信登录成功返回的页面(回调页面)
-define('BACKURL'         ,   BASE_SITE_URL . '/mobile/api/wxLogin/callback.php');
+define('BACKURL'         ,   'http://a.lrlz.com/mobile/api/wxLogin/callback.php');
 //微信登录所需的access_token信息存放文件位置
 define('TOKEN_FILE'      ,    'access_token.json');

+ 6 - 0
test/activity_helperTest.php

@@ -20,6 +20,12 @@ class activity_helperTest extends PHPUnit_Framework_TestCase
         Base::run_util();
     }
 
+    public function testUrlencode()
+    {
+        $x = 'http://a.lrlz.com/mobile/api/wxLogin/callback.php';
+        $y = urlencode($x);
+    }
+
     public function testGift()
     {
         $time = strftime("%Y-%m-%d %H:%M:%S",1474266342);