使用Fuelphp 1.7,URL似乎只能以大写形式工作。
例如,以下控制器仅适用于以下网址
并且不适用于以下网址(我希望可以使用)
这是控制器代码:
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/"
答案 0 :(得分:-2)
更改
class Controller_Index extends Controller
到
class Controller_index extends Controller
(注意大写)。