码农公社 210.net.cn 210= 1024 10月24日一个重要的节日--码农(程序员)节
PHP实现支付宝登录
1.支付宝路由拼接public function dev()
{
$http = 'https://openauth.alipaydev.com/oauth2/publicAppAuthorize.htm?';
$app_id = '';
$scope = 'auth_user';
$redirect_uri = urlencode('');
$state = '0';
$url = $http . 'app_id=' . $app_id . '&scope=' . $scope . '&redirect_uri=' . $redirect_uri . '&state=' . $state;
$this->redirect($url);
}
2.支付宝的回调页面
public function zhi()
{
$params = input();
require_once './plugins/auth/AopSdk.php';
$aop = new \AopClient ();
$aop->g