CodeIgniter Forums

Full Version: code igniter from shell?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]dedavai[/eluser]
is it possible to run CI from a Linux shell script? Would I point it to the index.php or the controller?

El Forum

[eluser]Randy Casburn[/eluser]
@dedavai -- yes, you can replace almost your entire csh, bornsh, bash, etc. with a phpsh if you would like. Having CI there would be interesting as an MVC design pattern makes little sense from a shell script though.

El Forum

[eluser]champs[/eluser]
How to invoke a CodeIgniter app from the command line/shell

Adapt as needed for *sh.

There are any number of reasons why you might want to do this, but the most important would be the DRY principle.

El Forum

[eluser]Randy Casburn[/eluser]
@champs,

Thanks champs -- I do a lot of cli stuff, but through a browser client. Doesn't look like you like that idea too much.

Here's a fun story foy you in case you've not seen.. http://winbinder.org/index.php

Randy