ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
**FrPHP url 解析规则,如下:** ~~~ http://www.xxx.com/   = http://www.xxx.com/index/index -------域名--------     --------域名------控制器-方法 -- http://www.xxx.com/index/test --------域名------控制器-方法-- http://www.xxx.com/admin/index/test --------域名-------分组--控制器-方法-- ~~~ 系统会根据伪静态规则自动识别分组,识别分组后识别控制器、方法(如果控制器或对应方法不存在则修正为 index)。 **URL 参数解析** ~~~ http://www.xxx.com/admin/index/test/frphp/10/56 --------域名-------分组--控制器-方法-参数集合-- 通过$this->gets = array('frphp',10,56)来记录url传递的参数 ~~~ 系统解析分组、控制器、方法后会依次解析url参数,以“/”作为分隔符,拆分成数组后保存到控制器的gets属性! **代码示例** ~~~ //url : http://localhost/index/test/frphp/10/56; //控制器代码 <?php class indexController extends FrBase{     public function index(){}     public function test(){         print_r($this->gets);     } } //输出结果 //Array ( [0] => frphp [1] => 10 [2] => 56 ) ~~~