Difference between revisions of "Server API"
From Fernseher
Jump to navigationJump to search
Line 7: | Line 7: | ||
*runCmd(cmdstring): function execute a command on the server (with the httpd daemon's permissions!) execution of the script will wait until the cmd is finished, and will return the exit status of the command. | *runCmd(cmdstring): function execute a command on the server (with the httpd daemon's permissions!) execution of the script will wait until the cmd is finished, and will return the exit status of the command. | ||
*runCmd(cmd, array of args): same as above, but executes the given command with the arguments given in the array. arguments will be escaped or quoted as necessary | *runCmd(cmd, array of args): same as above, but executes the given command with the arguments given in the array. arguments will be escaped or quoted as necessary | ||
*runCmd(File, array of args): same as above, but takes the given command from the File object passed in. |
Revision as of 17:00, 20 January 2009
Data members on the global server object:
- env: array of environment variables, including standard request headers and server information
Functions on the global server object:
- logNotice(string|array of strings): function to log a notice (or a list of notices) to the server error log
- logError(string|array of strings): function to log an error (or a list of errors) to the server error log
- runCmd(cmdstring): function execute a command on the server (with the httpd daemon's permissions!) execution of the script will wait until the cmd is finished, and will return the exit status of the command.
- runCmd(cmd, array of args): same as above, but executes the given command with the arguments given in the array. arguments will be escaped or quoted as necessary
- runCmd(File, array of args): same as above, but takes the given command from the File object passed in.