如何在删除index.php时通过CLI执行Codeigniter端点



我正在使用Codeigniter 2。为了使事情变得简单,我从URI中删除了index.php。我的端点工作正常,它们是这种格式的

www.hostapi/users/get

我需要更新一个后台进程,该进程可以在background vi linux命令中更新用户信息。为此,我创建了一个端点

www.hostapi/users/batchUpdates

当我通过curl执行时,这很好。但当我通过CLI执行时,它不会工作

php index.php users batchUpdates

我甚至试过

php users/bactchUpdates

我不确定如何处理这种情况,因为index.php是不可接受的

正确的语法是:

php index.php controller method params

请注意,控制器和方法名称之间有一个空格。

最新更新