【问题标题】:CakePhp 2.x Routing doesn't work [closed]CakePhp 2.x 路由不起作用[关闭]
【发布时间】:2013-12-02 20:01:01
【问题描述】:

我有这个链接:localhost/issoisso/categories/getCategories/categoryId:486

但我需要这个:localhost/issoisso/categoria/486

代码在这里:

gist.github.com/kleberksms/7756990

【问题讨论】:

    标签: php arrays cakephp routing router


    【解决方案1】:

    试试这个方法……

        Router::connect('/categoria/:categoryId', array('controller' => 'categories', 'action' => 'getCategories'), array(
        'pass' => array('categoryId'),
        'categoryId' => '[0-9]+'
    ));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-21
      • 1970-01-01
      • 2017-08-12
      • 1970-01-01
      • 1970-01-01
      • 2014-04-26
      • 1970-01-01
      相关资源
      最近更新 更多