DhruvPathak DhruvPathak - 1 year ago 96
PHP Question

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

As stated here :

A page like :

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 :


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

php index.php "myFolder/myController" myFunc myParam

Does not seem to work.

Answer Source

You can try with :

php index.php myFolder myController myFunc myParam1 myParam2 ...
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download