About login authorization issues, I index.php in the code
header('location:https://open.weixin.qq.com/connect/oauth2/authorize?appid=我的appid&redirect_uri=192.168.1.127%2foauth2.php&response_type=code&scope=snsapi_login&state=1#wechat_redirect');
Then open in 192.168.1.127, according to the code will jump to the authorization page, after the successful authorization, according to my understanding should jump to 192.168.1.127/oauth.php&code=xxxxxx&state=xxx, But not jump to the past, but jump to
Https://open.weixin.qq.com/connect/oauth2/192.168.1.127/oauth.php?code ...; Ask what's going on here?
Reply content:
About login authorization issues, I index.php in the code
header('location:https://open.weixin.qq.com/connect/oauth2/authorize?appid=我的appid&redirect_uri=192.168.1.127%2foauth2.php&response_type=code&scope=snsapi_login&state=1#wechat_redirect');
Then open in 192.168.1.127, according to the code will jump to the authorization page, after the successful authorization, according to my understanding should jump to 192.168.1.127/oauth.php&code=xxxxxx&state=xxx, But not jump to the past, but jump to
Https://open.weixin.qq.com/connect/oauth2/192.168.1.127/oauth.php?code ...; Ask what's going on here?
redirect_uriYou should take scheme it, http://example.com/foo.php.
Before the public can request the user to authorize the Web page, the developer must first configure the authorization callback domain name on the Developer Center page of the public platform website. Please note that this is the domain name (a string), not the URL, so do not add http://and other protocol headers;----Development documentation The first article on the description of the Web page authorization callback domain name
Your callback address is not added HTTP//
Callback address please use the standard URL address: http (s)://subdomain.domain.com/segment1/setment2/setmentn ...
Redirect_uri should take scheme, http://www.example.com/auth.php.
Need to configure the domain name authorized on the website in the Public Platform Developer Center, note that the domain name here is the above example.com
Cannot use IP ...