admin管理员组文章数量:1656604
1、首先到微信开放平台申请https://open.weixin.qq/ 获取到appid和APPSECRET,前台显示页面如下html>
var obj = new WxLogin({
id: "login_container",
appid: "wxed782be999f86e0e",
scope: "snsapi_login",
redirect_uri: encodeURIComponent("http://" + window.location.host + "/login.php"),
state: Math.ceil(Math.random()*1000),
style: "black",
href: ""});
2、PHP处理代码页面/*
require_once('weixin.class.php');
$weixin = new class_weixin();
*/
define('APPID', "wx19ba77624e083e08");
define('APPSECRET', "c1a56a5c4247dd44c320c9719c5ceb90");
class class_weixin
{
var $appid = APPID;
var $appsecret = APPSECRET;
//构造函数,获取Access Token
public function __construct($app
版权声明:本文标题:微信授权网页扫码登录php,PHP实现微信开放平台扫码登录源码 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1729741047a1211671.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论