Home  >  Article  >  Backend Development  >  【ThinkPHP】TP-四种url访问的形式_URL_MODEL

【ThinkPHP】TP-四种url访问的形式_URL_MODEL

WBOY
WBOYOriginal
2016-06-13 12:12:411423browse

【ThinkPHP】TP-四种url访问的方式_URL_MODEL

TP-四种url访问的方式

'URL_MODEL' => 1,

 URL访问模式,可选参数0、1、2、3,代表以下四种模式:

0 (普通模式); 

1 (PATHINFO 模式);  /*默认*/

2 (REWRITE 模式); 

3 (兼容模式)    


0:http://localhost/index.php?m=模块&c=控制器&a=操作方法     [get模式]
1:http://localhost/index.php/模块[模块文件夹]/控制器/操作方法    [pathinfo模式]  /*默认*/
2:http://localhost/模块[模块文件夹]/控制器/操作方法     [rewite重写模式]
3:http://localhost/index.php?s=/模块[模块文件夹]/控制器/操作方法  [兼容模式]



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn