摘要: 1.在路由(route.php)中定义一条路由 Route::rule('new/:name/:id','index/News/read'); 2.在index下的controller控制器中新建一个News控制器 <?php /** * Created by PhpStorm. * User: y 阅读全文
posted @ 2020-02-12 13:56 以己为镜 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1.在application中下的config.php中 以下代码改为true // 是否开启路由 'url_route_on' => true, // 是否强制使用路由 'url_route_must' =>true, 2.然后在route.php中定义路由 ps:把初始化的那些代码删除,不然无法 阅读全文
posted @ 2020-02-12 13:40 以己为镜 阅读(332) 评论(0) 推荐(0) 编辑