<?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');
}
}
Copyright 2014-2024 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
tp5.com/index/test1/demo3/lesson/dddd 测试的没问题啊,你是不是用的demo4方法?
传了值 啊 tp5.com/index/test1/demo3/lesson/dddd
你传值了吗?