2021
01-08
01-08
ThinkPHP6通过Ucenter实现注册登录的示例代码
在和ucenter通信成功后,实现注册登录就非常简单了。简要记录如下。1新建一个controller用来继承Ucenter\Controller\UcController,并新建构造方法,用来实例化UcController<?phpdeclare(strict_types=1);namespaceapp\controller;useUcenter\Controller\UcController;classucextendsUcController{/***构造方法,用于实例化UcController*/publicfunction__construct(){$this->init();}}2indexco...
继续阅读 >
春节期间熟悉了TP6,也写了一个TP6的博客程序,但系统的异常页面实在另外头疼,很多时候无法查看到是哪行代码出的问题。所以就特别的想把whoops引进来,经过一系列的研究,终于找到了解决的办法:1.通过composer安装whoops运行命令: composerrequirefilp/whoops注意:composer引进的文件如果有语法错误,需要提前把语法错误处理好才能进行安装,否则一直报错。2.使用whoops接管tp6的异常处理在/app/ExceptionHandle.ph...