CLI & Sub-folders |
Hey Guys,
I've been following the user guide at: https://ellislab.com/codeigniter/user-gu...l/cli.html with a file in xxx/application/controllers/Tools.php I can get the following to work: php index.php tools message I want to have a sub-directory within controllers like: xxx/application/controllers/cron/Tools.php I cannot get this to run properly! Keep getting: The controller/method pair you requested was not found. I've tried running the following: php index.php tools message php index.php cron/tools message php index.php "cron/tools" message php index.php "cron" tools message php index.php cron tools message php index.php /var/www/xxx/application/controllers/cron/tools message I'm thinking it's a routing issue, but due to the fact I'm using the CLI with attempts as absolute paths it shouldn't be. Not sure. I'm pulling my hair out!! Any help would be appreciated!
maybetry to create a custom route
PHP Code: $route['cron_tools/message'] = 'cron/tools/message';
So it turns out "tools" as a directory within application/controllers is a reserved word.
Eg: application/controllers/tools/Dosomething.php application/controllers/cron/Dosomething.php, or any other variant works just fine. Bloody hell.
It's not a reserved word, but controllers have priority over directories, so if you have a controllers/Tools.php ...
|
Welcome Guest, Not a member yet? Register Sign In |