关于TP5.1的跳转

<?php
namespace appdemocontroller; use thinkController; 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('失败'); } } }

  

原文地址:https://www.cnblogs.com/79524795-Tian/p/14544686.html