xyf90314

xyf90314

这家伙有点懒,还没写个性签名!

  • 财富值5257
  • 威望值40
  • 总积分6607

个人信息

  • 出什么样的错?

  • 2015-10-18 已签到
    连续签到9天,获得了20个金钱
  • 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/gii 估计不行;把web作为documentroot

    可以的 谢谢

  • 回复了 的回答

    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-detail

    enablePrettyUrl : 意思就是美化 URL
    如果為 true 則 URL 可以用路徑代表參數 反之
    如果為 false 是用參數代表路徑的方式

    那现在我的问题 应该如何破解

  • 2015-10-16 已签到
    连续签到7天,获得了20个金钱
  • 提出了问题
    设置了urlManager后 gii不能访问
  • 2015-10-15 已签到
    连续签到6天,获得了20个金钱
副总裁 等级规则
6607/10000
资料完整度
30/100
用户活跃度
0/100

Ta的关注

14

Ta的粉丝

21

Ta的访客

77