CodeIgniter Forums
code igniter from shell? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: code igniter from shell? (/thread-9535.html)



code igniter from shell? - El Forum - 06-28-2008

[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?


code igniter from shell? - El Forum - 06-29-2008

[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.


code igniter from shell? - El Forum - 06-29-2008

[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.


code igniter from shell? - El Forum - 06-29-2008

[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