| 123456789101112131415161718192021 |
- <?php
- function wx_login($appid, $scope, $state, $callback)
- {
- $login_url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $appid . '&redirect_uri=' . urlencode($callback) . '&response_type=code' . '&scope=' . $scope . '&state=' . $state . '&connect_redirect=1#wechat_redirect';
- header('Location:' . $login_url);
- }
- define('WXLOGIN', 1);
- $actionkey = isset($_GET['actionkey']) ? trim(htmlspecialchars($_GET['actionkey'])) : '';
- $data = '';
- @include '../../data/caches/wxlogin.php';
- $appid = $data['appid'];
- $appsecret = $data['appsecret'];
- $callback = $data['callback'] . '?actionkey=' . $actionkey;
- $scope = 'snsapi_userinfo';
- $state = 'mymps';
- wx_login($appid, $scope, $state, $callback);
- ?>
|