|
Apache Environment
All existing webserver environment variable are made available
to script writers and programmers in variable with the "cgi->" prefix.
|
${cgi->http_host}
|
htdb.org
|
|
${cgi->http_user_agent}
|
CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
|
|
${cgi->http_accept}
|
Accept: application/xhtml+xml,text/html;q=0.9,text/plain;
|
|
${cgi->http_accept_language}
|
en-us,en;q=0.5
|
|
${cgi->http_accept_encoding}
|
gzip
|
|
${cgi->http_accept_charset}
|
ISO-8859-1,utf-8;q=0.7,*;q=0.7
|
|
${cgi->http_connection}
|
close
|
|
${cgi->http_cache_control}
|
no-cache
|
|
${cgi->http_pragma}
|
no-cache
|
|
${cgi->server_signature}
|
<address>Apache/2.0.52 (CentOS) Server at htdb.org Port 80</address>
|
|
${cgi->server_software}
|
Apache/2.0.52 (CentOS)
|
|
${cgi->server_name}
|
htdb.org
|
|
${cgi->server_addr}
|
168.150.251.17
|
|
${cgi->server_port}
|
80
|
|
${cgi->remote_addr}
|
38.103.63.18
|
|
${cgi->document_root}
|
/var/www/vhosts/htdb.org/htdocs
|
|
${cgi->server_admin}
|
del[at]-remove-adjective.com
|
|
${cgi->remote_port}
|
48743
|
|
${cgi->gateway_interface}
|
CGI/1.1
|
|
${cgi->server_protocol}
|
HTTP/1.1
|
|
${cgi->request_method}
|
GET
|
|
${cgi->query_string}
|
|
|
${cgi->request_uri}
|
/htdb/docs/scripting/environment.html
|
|
${cgi->script_name}
|
/htdb
|
HTDB Environment
In addition to the server environment, HTDB adds several variables
to the in-memory store. Yes, all these should be prefixed with something
that makes sense, and eventually will be.
| ${db} | docs/scripting |
| ${page} | environment.html |
| ${pageResource} | docs/scripting_index.html |
| ${logResource} | docs/scripting/environment.html |
| ${_session_int} | 775970 |
| ${_db_timestamp} | 1210954528 |
| ${_timestamp} | 1210954528 |
| ${_current_date} | 16May2008 |
| ${_current_time} | 9:15 AM |
| ${_current_year} | 2008 |
| ${_current_day} | 16 |
| ${_current_hour} | 9 |
| ${_current_min} | 15 |
| ${_current_sec} | 28 |
| ${_current_weekday} | Fri |
| ${_current_monthnum} | 05 |
| ${_current_mon} | May |
| ${_current_month} | May |
| ${_current_pid} | 25841 |
| ${cgi->http_port} | |
| ${cgi->http_protocol} | http:// |
| ${_hit_count} | 4817 |
|