动态注册
路由定义采用\think\Route类的rule方法注册,通常是在应用的路由配置文件application/route.php进行注册,格式是:

如:正常访问是路由路径为:http://localhost/thinkphp/public/index.php/index/user/login;
在路由配置文件application/route.php进行注册,注册内容如下:

注册之后,访问路由路径为:http://localhost/thinkphp/public/index.php/login,访问内容与上面地址访问的内容一样。
网友评论