xyf90314
- xyf90314 2015-10-18 已签到连续签到9天,获得了20个金钱
- xyf90314 2015-10-17 已签到连续签到8天,获得了20个金钱
setting
enablePrettyUrl = true
a.Apache 設定 DocumentRoot 指向 "YourPath.../basic/web"
a.在你的 網址填入http://localhost/gii
b.不然看你 DocumentRoot 都沒指向 自己打上 /basic/web
b.在你的 網址填入http://localhost/basic/web/gii
http://localhost/basic/web/index.php?r=gii
改成http://localhost/basic/web/index.php/gii
就可以了 谢谢'urlManager'=> [ 'enablePrettyUrl' => true ] //'enablePrettyUrl' => true : //DocumentRoot ../basic/web //http://localhost/gii //'enablePrettyUrl' => false : //http://localhost/basic/web/index?r=gii
去看一下 yii2 documentaction 的介紹!!
http://www.yiiframework.com/doc-2.0/yii-web-urlmanager.html#$enablePrettyUrl-detailenablePrettyUrl
: 意思就是美化 URL
如果為 true 則 URL 可以用路徑代表參數 反之
如果為 false 是用參數代表路徑的方式那现在我的问题 应该如何破解
- xyf90314 2015-10-16 已签到连续签到7天,获得了20个金钱
- xyf90314 2015-10-15 已签到连续签到6天,获得了20个金钱