(1)在类中测试
namespace app\home\controller;
use houdunwang\route\Controller;
class Entry extends Controller
{
public function index()
{
dd(u('home/user/add',['id'=>1,'cid'=>22]));
return View::with('framework', 'HDPHP')->make();
}
}
(2)在view中测试
<dd><a href="{{u('home/user/add',['id'=>1,'cid'=>22])}}">添加用户</a></dd>
(3)在user类中添加
<?php namespace app\home\controller;
use houdunwang\route\Controller;
class User extends Controller{
//动作
public function index(){
//此处书写代码...
echo "第一个测试";
}
public function add(){
//此处书写代码...
p($_GET);
echo q('get.id');
dd(q('get.cid'));
//echo "chen添加测试";
}
}