login.php 552 B

12345678910
  1. <?php
  2. $appid = 'wx2a2d24fbe2383604';
  3. $cmurl = "ts.shanghairongxuan.top/index/index/gzhop?v=";//接口地址
  4. //$cmurl = "jy.chengwuwa.cn/index/index/gzhop?v=";//接口地址
  5. #你的公众号appid
  6. $url="https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri=https%3a%2f%2f".$cmurl."%2fcallback.php&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
  7. //$url='/login.html';
  8. #redirect_uri改为你的网页授权域名和刚刚跳转到的显示页面,比如我的是getinfoDetail.php
  9. header('location:'.$url);
  10. ?>