Manage URL routes in own php framework

前端 未结 12 2117
盖世英雄少女心
盖世英雄少女心 2021-02-02 16:34

I\'m creating a PHP Framework and I have some doubts...

The framework takes the url in this way: http:/web.com/site/index

It takes the first paramet

12条回答
  •  醉梦人生
    2021-02-02 16:57

    Even if you are creating your own framework, there is no reason not to reuse robust, well tested and documented components, like this Routing component.

    Just use Composer, which has become the standard for dependency management in PHP, and you'll be fine. Add as many components as you want to your stack.

    And here you have a must read guide on how to make your own framework.

提交回复
热议问题