URL模式

HeartPHP框架基于模块和操作的方式进行访问,由于HeartPHP框架的应用采用单一入口文件来执行,因此网站的所有的模块和操作都通过URL的参数来访问和执行。这样一来,传统方式的文件入口访问会变成由URL的参数来统一解析和调度。

 URL设置:

设置路径:conf/config.php

 URL参数结构:

d: 目录 (可省略,默认是controller跟目录)

c: 控制器

c: 方法

一、普通模式: 'path_info' => false

 
目录模式:
http://heartphp.com/index.php?d=mulu&c=index&a=test

无目录模式:
http://heartphp.com/index.php?c=index&a=test

一、PATHINFO模式: 'path_info' => true

 
目录模式:
http://heartphp.com/mulu/index/test

无目录模式:
http://heartphp.com/index/test