2004-01-10 17:07:27 +00:00
|
|
|
<?xml version='1.0' encoding='iso-8859-1'?>
|
2005-01-18 18:08:08 +00:00
|
|
|
<!-- $Revision: 1.4 $ -->
|
2004-01-10 17:07:27 +00:00
|
|
|
<refentry id="function.apache-getenv">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>apache_getenv</refname>
|
2004-08-22 10:14:34 +00:00
|
|
|
<refpurpose>Get an Apache subprocess_env variable</refpurpose>
|
2004-01-10 17:07:27 +00:00
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
2004-01-17 11:43:05 +00:00
|
|
|
<type>string</type><methodname>apache_getenv</methodname>
|
2004-01-10 17:07:27 +00:00
|
|
|
<methodparam><type>string</type><parameter>variable</parameter></methodparam>
|
|
|
|
<methodparam choice="opt"><type>bool</type><parameter>walk_to_top</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
2004-08-22 10:14:34 +00:00
|
|
|
<para>
|
|
|
|
<function>apache_getenv</function> returns the value of the Apache
|
|
|
|
environment variable specified by <parameter>variable</parameter>, or
|
|
|
|
&false; on failure.
|
|
|
|
</para>
|
2005-01-18 18:08:08 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
<function>apache_getenv</function> is only defined when using
|
|
|
|
Apache 2.
|
|
|
|
</para>
|
|
|
|
</note>
|
2004-08-22 10:14:34 +00:00
|
|
|
<example>
|
|
|
|
<title><function>apache_getenv</function> example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
$ret = apache_getenv("SERVER_ADDR");
|
|
|
|
echo $ret;
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
<para>
|
|
|
|
The example above shows how to retrieve the value of the Apache
|
|
|
|
environment variable "SERVER_ADDR".
|
|
|
|
</para>
|
|
|
|
</example>
|
|
|
|
<para>
|
2005-01-18 18:08:08 +00:00
|
|
|
See also <function>apache_setenv</function>,
|
|
|
|
<function>getenv</function>&listendand;
|
|
|
|
<link linkend="language.variables.superglobals">Superglobals</link>.
|
2004-08-22 10:14:34 +00:00
|
|
|
</para>
|
2004-01-10 17:07:27 +00:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|