tp6路由设置根据目录自动 /home/index/test

2021-12-08 13:54:00 浏览数 (2)

route/app.php

代码语言:javascript复制
<?php
//  ----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
//  ----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
//  ----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
//  ----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
//  ----------------------------------------------------------------------
use thinkfacadeRoute;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::get('hello/:name', 'index/hello');

Route::rule('<version>/<controller>/<action>','<version>.<controller>/<action>');
复制代码

0 人点赞