PHP Application URL Routing

后端 未结 8 1925
梦毁少年i
梦毁少年i 2020-11-29 00:15

So I\'m writing a framework on which I want to base a few apps that I\'m working on (the framework is there so I have an environment to work with, and a system that will let

8条回答
  •  一整个雨季
    2020-11-29 00:48

    I think a lot of frameworks use a combination of Apache's mod_rewrite and a front controller. With mod_rewrite, you can turn a URL like this: /people/get/3 into this: index.php?controller=people&method=get&id=3. Index.php would implement your front controller which routes the page request based on the parameters given.

提交回复
热议问题