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

search for in the

apache_lookup_uri> <apache_get_version
Last updated: Fri, 13 Nov 2009

view this page in

apache_getenv

(PHP 4 >= 4.3.0, PHP 5)

apache_getenvRetorna uma variável subprocess_env do Apache

Descrição

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

Retorna a variável de ambiente do Apache especificada por variable .

Essa função requer Apache 2, caso contrário ela é indefinida.

Parâmetros

variable

A variável de ambiente do Apache

walk_to_top

Se deve ou não retorna a variável de alto-ní­vel disponí­veis em todas as camadas do Apache.

Valor Retornado

O valor da variável de ambiente do Apache se tiver sucesso, ou FALSE se falhar

Exemplos

Exemplo #1 Exemplo de uso da função apache_getenv()

O exemplo abaixo mostra como obter o valor da variável de ambiente do Apache SERVER_ADDR.

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

O exemplo acima irá imprimir algo similar a:

42.24.42.240

Veja Também



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, 13 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites