PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

apache_lookup_uri> <apache_get_version
Last updated: Fri, 03 Oct 2008

view this page in

apache_getenv

(PHP 4 >= 4.3.0, PHP 5)

apache_getenvApache の subprocess_env 変数を取得する

説明

string apache_getenv ( string $variable [, bool $walk_to_top ] )

variable で指定された Apache 環境変数を取得します。

この関数は Apache 2 を必要とします。それ以外では定義されていません。

パラメータ

variable

Apache の環境変数を指定します。

walk_to_top

全ての Apache レイヤについてのトップレベル変数を取得するかどうか を指定します。

返り値

成功時は Apache 環境変数の値、失敗時は FALSE を返します。

例1 apache_getenv() の例

この例は、Apache の環境変数 SERVER_ADDR をどの様に取得するかを示しています。

<?php
$ret 
apache_getenv("SERVER_ADDR");
echo 
$ret;
?>

上の例の出力は、たとえば 以下のようになります。

42.24.42.240



add a note add a note User Contributed Notes
apache_getenv
There are no user contributed notes for this page.

apache_lookup_uri> <apache_get_version
Last updated: Fri, 03 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites