AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## success 成功登录跳转 必须先继承基类 class Index extends Controller ## 语法: $this->success('登录成功','url',' data',等待时间单位秒); ~~~ $this->success('登录成功','http://www.baidu.com','',10); ~~~ 代码案例: ~~~ <?php namespace app\index\controller; use think\Controller; class Index extends Controller //基础基础类 可以得到90%的功能 { public function _initialize() { } public function index(){ $this->success('登录成功','http://www.baidu.com','',10); } } ~~~ ### 效果 ![](https://img.kancloud.cn/65/a0/65a08733df42a3c4c5f540443d3593e1_1160x515.png) ## 跳转自己网站404解决方法 ![](https://img.kancloud.cn/11/ae/11aef99af3b935345d5667ff971e9b44_1561x936.png) 重写nginx https://www.kancloud.cn/manual/thinkphp5/177576 ![](https://img.kancloud.cn/22/09/2209d656a0ea86ab2f6b948b22b9f01f_1757x894.png) 把这代码写到nginx配置里去隐藏掉 index.php ![](https://img.kancloud.cn/82/4a/824ae8fadd7758963283bed9bed719d4_1872x864.png) 就可以解决了 ## error 登录失败跳转 与登录成功跳转一样的属性 `$this->error ('登录失败','url',' data',等待时间单位秒);`