Hey Kexiao, you will have to write your own request handler (YourPrefix_Controller_Request_Cli, for example) and router that utilise input from stdin, $_SERVER['args'] or similar sources (basically the parameters you give to the script), since Zend_Controller_Request_Http obviously does not know how to handle "requests" that are coming from a command line, and the rewrite router does not know how to route them. As its name states, this router is designed for use in a Http environment.
Oh, and I'm pretty sure lots of developers on this mailing list may love to have a look at your solution for this problem, because it's a problem that many of us will face sooner or later. So if you are willing to share the source code, feel free to do so ;-). Greetings from over here in Germany, Tobias PS @all: I for myself am indeed really surprised that ZF itself still lacks a solution for this problem. Maybe this falls under the 20% of use cases ZF is not going to cover itself? It'd be great if a Zender could clarify :-) 2007/10/9, Kexiao Liao <[EMAIL PROTECTED]>: > > > We need to run the Zend Framework bootstrap file(index.php in our case) > from > Unix/Linux command line as following: > > php5 index.php. > > The bootstrap file can also be launched from the normal http request > through > the remote web browser access. > > When we try to launch it from command line, the front Controller dispatch > statement($response = $frontController->dispatch();) need to be commend > out. > Is there any condition we can put before the front Controller dispatch > statement from zend framework? > > > -- > View this message in context: > http://www.nabble.com/run-ZF-bootstrap-file%28index.php%29-from-command-line-tf4596352s16154.html#a13122713 > Sent from the Zend Framework mailing list archive at Nabble.com. > >
