<?php $current_url = 'http://t.ect99.com/wxtmp/wx.php'; $appid = 'wx2b29f5846b8d00fa'; header('Location: https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$appid.'&redirect_uri='.urlencode($current_url).'&response_type=code&scope=snsapi_base&state=123#wechat_redirect');