Difference between revisions of "Server API"

From Fernseher
Jump to navigationJump to search
(New page: 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...)
 
Line 5: Line 5:
*logNotice(string|array of strings): function to log a notice (or a list of notices) to the server error log
*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
*logError(string|array of strings): function to log an error (or a list of errors) to the server error log
*system(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.
*system(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

Revision as of 12:56, 9 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