【文件属性】:
文件名称:txiki-router:PHP的简单路由器
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-22 02:56:46
PHP
Txiki 路由器
PHP的简单路由器
安装
通过作曲家
$ composer require txiki/router
要求
此版本支持以下 PHP 版本。
PHP 5.4
PHP 5.5
PHP 5.6
HHVM
文档
简单的例子:
// load composer autoload
require '../vendor/autoload.php' ;
use Txiki \ Router \ Route ;
$ r = new Route ();
// add GET route
$ r -> get ( '/home' , function (){
return "GET Hello world!" ;
});
//tell router what you want to process, the route and the http method
$ rout
【文件预览】:
txiki-router-master
----composer.json(771B)
----CONTRIBUTING.md(67B)
----src()
--------RouteException.php(123B)
--------RouteRegex.php(402B)
--------RouteObject.php(2KB)
--------Route.php(5KB)
----LICENSE.md(1KB)
----CHANGELOG.md(217B)
----README.md(3KB)