Codeigniter - 控制器文件夹名称中的点

时间:2017-08-16 14:32:24

标签: codeigniter

我正在使用最新版本的Codeigniter,并尝试实现特定的控制器文件夹结构。

我想为我的每个webapp版本创建一个控制器文件夹:

/controllers/1.0.0/login (where login is the name of the controller)
/controllers/2.0.0/login (where login is the name of the controller)

问题:似乎Codeigniter在控制器文件夹方面工作得很好但不能使用包含点的控制器文件夹:(

喜欢这种有效的工作(没有点):

/controllers/100/login (where login is the name of the controller)

/controllers/200/login (where login is the name of the controller)

有没有办法让Codeigniter在控制器文件夹上使用点?

由于 晒

1 个答案:

答案 0 :(得分:0)

我也遇到同样的问题。 您可以在自己的路线中使用

config / route.php

$route['Controller/1.0.0/login'] = 'Controller/100/login';
$route['Controller/2.0.0/login'] = 'Controller/200/login';

这对我来说很好

相关问题