M 項目目錄/應用目錄(Home)/Lib/Model
V 項目目錄/應用目錄(Home)/Tpl
C 項目目錄/應用目錄(Home)/Lib/Action
url的4種訪問方式 //重點!
public function getshow(){
echo "你的姓名:".$_GET['name']." 你的年齡:".$_GET['age'];
}
1.PATHINFO 模式 -- 常用方法
http://localhost:8080/Think3.2/index.php/User/getshow/name/tim/age/18
http://域名/項目名/入口文件/模塊名/方法名/鍵1/值1/鍵2/值2
2.普通模式
http://localhost:8080/Think3.2/index.php?m=User&a=getshow&name=tim&age=18
http://域名/項目名/入口文件?m=模塊名&a=方法名&鍵1=值1&鍵2=值2
3.REWRITE模式
http://localhost:8080/Think3.2?m=User&a=getshow&name=tim&age=18
http://域名/項目名/模塊名/方法名/鍵1/值1/鍵2/值2
4.兼容模式
http://localhost:8080/Think3.2/index.php?s=User/getshow/name/tim/age/18
http://域名/項目名/入口文件?s=模塊名/方法名/鍵1/值1/鍵2/值2