Fuelphp控制器URL中的大写

时间:2016-04-17 00:55:40

标签: fuelphp

使用Fuelphp 1.7,URL似乎只能以大写形式工作。

例如,以下控制器仅适用于以下网址

  

http://www.example.com/Index/test/

并且不适用于以下网址(我希望可以使用)

  

http://www.example.com/index/test/

这是控制器代码:

class Controller_Index extends Controller
{

        public function action_test()
        {
                echo 'here';
                die();

        }
}

我尝试将case_sensitive设置为false

 'routing' => array(
    /**
     * Whether URI routing is case sensitive or not
     */
     'case_sensitive' => false,
 );

看起来索引正在重定向中被剪切。其他控制器名称在小写字母中正常工作。请参阅$ _SERVER超全局下面的内容。 (路由首先基于PATH_INFO工作)

  ["REQUEST_URI"]=>
  string(12) "/index/test/"
  ["SCRIPT_NAME"]=>
  string(10) "/index.php"
  ["PATH_INFO"]=>
  string(6) "/test/"

1 个答案:

答案 0 :(得分:-2)

更改

class Controller_Index extends Controller

class Controller_index extends Controller

(注意大写)。