Sep
17
2010
apache_getenv()

> example

The example above shows how to retrieve the value of the Apache environment variable SERVER_ADDR.

apache_getenv

(PHP 4 >= 4.3.0, PHP 5)

apache_getenv -- Get an Apache subprocess_env variable

Описание

string apache_getenv ( string variable [, bool walk_to_top] )

Get an Apache environment variable as specified by variable.

This function requires Apache 2 otherwise it's undefined.

Список параметров

variable

The Apache environment variable

walk_to_top

Whether to get the top-level variable available to all Apache layers.

Возвращаемые значения

The value of the Apache environment variable on success, or FALSE on failure

Примеры


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

Результатом выполнения данного примера будет что-то подобное:

42.24.42.240

Смотрите также

apache_sentenv()
getenv()
Superglobals

 
 
 
Комментарии
Добавить новый Поиск
Оставить комментарий
Имя:
Email:
 
Веб-сайт:
Тема:
UBB-Код:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Пожалуйста, введите проверочный код, который Вы видите на картинке.
Powered by !JoomlaComment 3.26

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

 

Кто онлайн

Сейчас 31 гостей онлайн