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, 14 Aug 2009

view this page in

apache_getenv

(PHP 4 >= 4.3.0, PHP 5)

apache_getenvLit une variable de processus Apache

Description

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

Récupère une variable d'environnement d'Apache.

Cette fonction requiert Apache 2, autrement elle est indéfinie.

Liste de paramètres

variable

La variable d'environnement Apache.

walk_to_top

Si passé à TRUE, récupération de la variable de haut niveau disponible pour toutes les couches d'Apache.

Valeurs de retour

La valeur de la variable d'environnement d'Apache en cas de réussite ou FALSE en cas d'échec.

Exemples

Exemple #1 Exemple avec apache_getenv()

L'exemple suivant montre comment récupérer la valeur de la variable d'environnement SERVER_ADDR.

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

L'exemple ci-dessus va afficher quelque chose de similaire à :

42.24.42.240

Voir aussi



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