すべてのサーバ変数

UNIQUE_ID: W6hyNgsfILP6FI4TMT4kDgAAAA4
HTTP_USER_AGENT: CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_IF_MODIFIED_SINCE: Thu, 21 Jun 2018 00:42:54 GMT
HTTP_HOST: oku.edu.mie-u.ac.jp
HTTP_CONNECTION: Keep-Alive
HTTP_ACCEPT_ENCODING: gzip
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.196.13.210
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: 34210
GATEWAY_INTERFACE: CGI/1.1
SERVER_PROTOCOL: HTTP/1.1
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: 1537765942.931
REQUEST_TIME: 1537765942

ソース

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

奥村晴彦

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