推荐简单的PHP路由引擎

发布于 2025-01-04 11:51:00 字数 1536 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

我最亲爱的 2025-01-11 11:51:00

您可能已经找到了解决方案,但我最近使用的路由类之一就是这两个,并且它们已被证明是有效的。

PHPRouter.php https://github.com/dannyvankooten/PHP-Router
AltoRouter.php https://github.com/dannyvankooten/AltoRouter

You probably already found a solution but one of the routing classes I've been using lately are these two and they've proven to be effective.

PHPRouter.php https://github.com/dannyvankooten/PHP-Router
AltoRouter.php https://github.com/dannyvankooten/AltoRouter

滴情不沾 2025-01-11 11:51:00

您可能会发现 Silex 很有趣。否则,如果您只关心路由,那么使用 mod_rewrite 是最有效的解决方案。

You might find Silex interesting. Otherwize if you only care about routing, using mod_rewrite is the most efficient solution.

暮凉 2025-01-11 11:51:00

您可能会考虑剥离 Zend Framework 并仅使用相关部分,例如:

  • 应用程序
  • 路由器
  • 前端控制器

但是您必须自己减轻重量,它工作得非常好!

You might consider stripping down Zend Framework and only use the relevant parts, like:

  • Application
  • Router
  • Front controller

However you will have to make it loose weight yourself, it works pretty nice!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文