phpzend-frameworkzend-application

Running a Zend_Application from the command line?


Is there a blessed way to run a Zend_Application from the command line? That is, I want to run a shell script that invokes a Zend_Application, loads its configuration, and then calls a specific controller action OR run an arbitrary command line script with access to the applications configurations, models, etc.

I can think of a few ways to hack this together, but it seems like the kind of thing where there may be an official (but poorly documented) way of doing it.


Solution

  • here's one way: http://webfractor.wordpress.com/2008/08/14/using-zend-framework-from-the-command-line/

    if there is actually a web server in the mix, you could also of course trigger w/wget or lynx... wget --quiet http://server/app/doTheThing