<?php<br>
namespace app\demo\controller;
use think\Controller;
class Demo extends Controller
{
public function a(){
echo "string";
}
public function index()
{
$User ='10';
if ($User> '10') {
//设置成功后跳转页面的地址,默认的返回页面是$_SERVER['HTTP_REFERER']
// 'Demo/a' Demo是Demo控制器class a是执行器 方法
$this->success('成功', 'Demo/a');
} else {
//错误页面的默认跳转页面是返回前一页,通常不需要设置
$this->error('失败');
}
}
}
关于TP5.1的跳转
最新推荐文章于 2023-06-26 23:31:34 发布