Quercus: Command Line Interface (CLI)

From Resin 3.0

Revision as of 13:00, 21 October 2009 by Nam (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Quercus 4.0.2+ exposes a command-line interface (CLI) that is easier to use than the javax.script API that comes with Java 1.6. The CLI behaves similarly to PHP's CLI.

Executing a script on the command line

CliQuercus is the class that contains the public void main() method. To execute a script, you would need to pass in the filename to CliQuercus:

 java -cp resin.jar com.caucho.quercus.CliQuercus [flags] <file> [php-args]

Example:

 java -cp resin.jar com.caucho.quercus.CliQuercus foo.php

The following optional flags are supported:

 -f            : Explicitly sets the script filename.
 -d name=value : Sets a php ini value.

Personal tools