師匠の散歩

きままにPerlでも

show Environment caliables

環境変数を表示する/ GetEnv.cgi

主要なコードはこれだけである

for $key (sort(keys(%ENV))) {
    print "$key <> $ENV{$key}";
}
1CONTEXT_DOCUMENT_ROOT/home/xs045883/e-central.tv/public_html/tancro
2CONTEXT_PREFIX
3DOCUMENT_ROOT/home/xs045883/e-central.tv/public_html/tancro
4GATEWAY_INTERFACECGI/1.1
5HTTPSon
6HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
7HTTP_ACCEPT_LANGUAGEen-US,en;q=0.5
8HTTP_CONNECTIONclose
9HTTP_HOSTtancro.e-central.tv
10HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
11HTTP_X_ACCEL_EXPIRES60
12HTTP_X_FAILURE_CACHE_TIME0
13HTTP_X_FILE_TYPEnormal
14HTTP_X_FORWARDED_FOR44.197.197.23
15HTTP_X_FORWARDED_HOSTtancro.e-central.tv
16HTTP_X_FORWARDED_PORT443
17HTTP_X_FORWARDED_PROTOhttps
18HTTP_X_FORWARDED_SSLon
19HTTP_X_REAL_IP44.197.197.23
20HTTP_X_SERVER_ADDRESS202.210.8.156
21HTTP_X_UA_DEVICEpc
22HTTP_X_WP_ACCESS0
23PATH/usr/local/bin:/usr/bin:/bin
24QUERY_STRING
25REMOTE_ADDR44.197.197.23
26REMOTE_PORT48992
27REQUEST_METHODGET
28REQUEST_SCHEMEhttps
29REQUEST_URI/grandmaster/perl/GetEnv.cgi
30SCRIPT_FILENAME/home/xs045883/e-central.tv/public_html/tancro/grandmaster/perl/GetEnv.cgi
31SCRIPT_NAME/grandmaster/perl/GetEnv.cgi
32SERVER_ADDR202.210.8.156
33SERVER_ADMINwebmaster@e-central.tv
34SERVER_NAMEtancro.e-central.tv
35SERVER_PORT443
36SERVER_PROTOCOLHTTP/1.1
37SERVER_SIGNATURE
38SERVER_SOFTWAREApache
39UNIQUE_IDYU3GVIu9YIlDJwgHnzRHaAAAALs

ローカル(自パソコン)の結果とサーバーアップ後のデータの違いを見つけるのも面白いと思う。


GetEnv.cgi // Topに戻る // indexに戻る
Copyright(C) 2009-2021 Grandmaster Last up : 2020/09/18