tgy3300

tgy3300

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

  • 财富值10
  • 威望值10
  • 总积分300

个人信息

  • 回复了 的回答
    use  frontend\modules\aa\controllers\UsersController\actionDoLogin
    

    404 错误

  • 回复了 的回答
    use  frontend\modules\aa\controllers\UsersController\actionDoLogin
    

    这方法试过了,不行的,

  • 提出了问题
    Yii2中如何跨应用调用方法?
  • 回复了 的回答

    URL manager 按照 rules 内规则声明的先后顺序依次检查,找到第一个匹配的规则后就会使用该规则,之后的所有规则,不管是否匹配,都会忽略。

    the URL manager examines the rules in the order they are declared and looks for the first rule that matches the requested URL. The matching rule is then used to parse the URL into a route and its associated parameters.

    URL Rules

    你声明的这两条规则中,

    'article' => 'article/index'
    

    是多余的,因为 indexdefault action, 可以自动识别。

    我知道可以自动识别,我就是不想用 article/index.html 这样的url,想用 article.html 这样的url

  • 提出了问题
    使用urlManager配置规则来美化url问题
  • 回复了 的回答

    rules 里面 'login' => '/service/login'=> 'login' => 'service/login' 斜杠去掉试试。
    不行就把log贴出来。

    试过了,没用

  • 回复了 的回答

    不知道你的nginx里面加上隐藏index.php的规则了么?

    location / {
        # Redirect everything that isn't a real file to index.php
        try_files $uri $uri/ /index.php?$args;
    }
    

    已经加了的

  • 提出了问题
    yii2 url美化问题
  • 回复了 的回答

    你把app.php放在common\messages\zh-CN\app.php不就好了?当然,要改下配置文件,我就是这么玩的

    怎么改配置呢?

见习主管 等级规则
300/500
资料完整度
20/100
用户活跃度
0/100

Ta的关注

3

Ta的粉丝

4

Ta的访客

16