?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