<?php
namespace app\index\controller;
use think\Controller;
class Test1 extends Controller
{
public function index(){
return 'shepi';
}
public function demo3()
{
return '学习'.$this->request->param('lesson');
}
public function demo4()
{
return '学习'.$this->request->get('lesson');
//return '学习'.Request::instance()->param('lesson');
}
}
tp5.com/index/test1/demo3/lesson/dddd The test is fine. Did you use the demo4 method?
The value is passed tp5.com/index/test1/demo3/lesson/dddd
Did you pass the value?