PHP路由库FastRoute的使用教程

PHP路由库FastRoute的使用教程
GitHub: https://github.com/nikic/FastRoute 这个库提供了基于正则表达式的快速路由实现,这篇文章解释了 FastRoute 是如何工作的和它为什么很快。 安装 通过 composer 安装 composer require nikic/fast-route 要求 PHP 5.4 及更高的版本 使用 这是一个基本的使用示例: <?php require '/path/to/vendor/autoload.php'; $dispatcher = FastRoute\simpleDispatcher(function(FastRoute\RouteCollec...
Copyright © 四季博客 保留所有权利.   Theme  Ality

用户登录