当前位置 : 主页 > 网络编程 > PHP >

fastadmin $this->success网址携带,页面读取参数

来源:互联网 收集:自由互联 发布时间:2023-09-06
?phpnamespace app\index\controller;use app\common\controller\Frontend;class Index extends Frontend{ protected $noNeedLogin = '*'; protected $noNeedRight = '*'; protected $layout = ''; public function index() { return $this-view-fetch(); } p
<?php

namespace app\index\controller;

use app\common\controller\Frontend;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        return $this->view->fetch();
    }

    public function ceshi()
    {
        $this->success('成功',url('index/index/ceshi2',['abc'=>'123','de'=>'666']));
    }

    public function ceshi2(){
        $p=$this->request->param('abc');
        // $ps=$this->request->post();
        // $get=$this->request->header();
        print_r($p);
        // print_r($ps);
        // print_r('<pre>');
        // print_r($get);
        // print_r('</pre>');

    }

    public function ceshi3()
    {
        $this->success('成功',url('index/index/ceshi2',['abc' =>'1', 'ceshi' =>'2222']));
    }

}

执行网址:http://localhost/index/index/ceshi

跳转网址:http://localhost/index/index/ceshi2/abc/123/de/666.html

返回参数:123

上一篇:fastadmin数据库改动后手工修改相关文件
下一篇:没有了
网友评论