The function of scanning QR code to log in to the website implemented by thinkPHP and WeChat official account

WBOY
Release: 2016-07-25 08:43:59
Original
3431 people have browsed it
Use thinkPHP and the function of scanning QR codes with parameters provided by WeChat public accounts to realize the function of users logging into the website. This saves users from tedious processes such as registering and entering account numbers, improves user experience, and can bring benefits to WeChat public accounts. For those of you who are fans, I would like to share with you today: how to use the QR code scanning event mechanism with parameters provided by thinkPHP and the WeChat official account to realize the function of logging in to the website. It can be used in onethink. For details, please see: http://vote.wucheshuedu.com/index.php?s=/Home/Article/detail/id/28.html The function of scanning QR code to log in to the website implemented by thinkPHP and WeChat official account The function of scanning QR code to log in to the website implemented by thinkPHP and WeChat official account The function of scanning QR code to log in to the website implemented by thinkPHP and WeChat official account The function of scanning QR code to log in to the website implemented by thinkPHP and WeChat official account
  1. /* Follow WeChat public account login*/
  2. public function login(){
  3. $src = get_qrcode(time(), 2);
  4. $this->assign('src', $src);
  5. $this->assign('scene_id', $_SESSION['scene_id']);
  6. $this->display();
  7. }
Copy code
thinkPHP


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!