すべてのサーバ変数

UNIQUE_ID: WmDcTeC9fgHtxw8E@eO-HQAAAAw
HTTP_HOST: oku.edu.mie-u.ac.jp
HTTP_ACCEPT_ENCODING: x-gzip, gzip, deflate
HTTP_USER_AGENT: CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SERVER_SIGNATURE: 
SERVER_SOFTWARE: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 SVN/1.7.14
SERVER_NAME: oku.edu.mie-u.ac.jp
SERVER_ADDR: 133.67.87.218
SERVER_PORT: 80
REMOTE_ADDR: 54.163.39.19
DOCUMENT_ROOT: /var/www/html
REQUEST_SCHEME: http
CONTEXT_PREFIX: /~okumura
CONTEXT_DOCUMENT_ROOT: /home/okumura/public_html
SERVER_ADMIN: okumura@edu.mie-u.ac.jp
SCRIPT_FILENAME: /home/okumura/public_html/php/allenv.php
REMOTE_PORT: 47586
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.0
REQUEST_METHOD: GET
QUERY_STRING: 
REQUEST_URI: /~okumura/php/allenv.php
SCRIPT_NAME: /~okumura/php/allenv.php
PHP_SELF: /~okumura/php/allenv.php
REQUEST_TIME_FLOAT: 1516297293.239
REQUEST_TIME: 1516297293

ソース

<pre>
<?php
  foreach ($_SERVER as $x => $y) {
    echo htmlspecialchars("$x: $y\n");
  }
?>
</pre>

奥村晴彦

Last modified: 2012-04-18 15:40:06