Server API

From Fernseher
Revision as of 12:55, 9 January 2009 by 129.42.161.36 (talk) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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
  • 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.
  • 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