Fandom

PHP Wiki

Apache getenv

51pages on
this wiki
Add New Page
Talk0 Share

Description Edit

apache_getenv gets an Apache environment variable as specified by variable.

Parameters Edit

{{{returns}}} apache getenv (string variable [, boolean walk_to_top])

Parameter Infos Edit

Parameter PHP Version Type
apache_getenv 4 >= 4.3.0 or 5 with Apache 2 returns string
variable 4 >= 4.3.0 or 5 with Apache 2 string
walk_to_top

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

4 >= 4.3.0 or 5 with Apache 2 boolean


Examples Edit

Example 1: Edit

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

Output Edit

// Could be similar to this
127.0.0.1


See also Edit

apache_setenv, getenv

For more details on this function, visit its entry in the php manual.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.