DhruvPathak DhruvPathak - 5 months ago 21
PHP Question

CodeIgnitor : Run a script from command line if the controller is inside a folder?

As stated here :
http://codeigniter.com/user_guide/general/cli.html

A page like :
http://www.example.com/myController/myFunc/myParam

can be run on the command line as :

php index.php myController myFunc myParam


My codeignitor set up has some folders to group the controllers, lets say like this :

myFolder -> myPageController
-> myAdminController


So, the url becomes :

http://www.example.com/myFolder/myController/myFunc/myParam

How do I call the same thing on CLI ?
Something like :

php index.php "myFolder/myController" myFunc myParam


Does not seem to work.

Answer

You can try with :

php index.php myFolder myController myFunc myParam1 myParam2 ...