php-doc-en/reference/apache/functions/apache-getenv.xml

69 lines
1.9 KiB
XML
Raw Normal View History

<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.apache-getenv">
<refnamediv>
<refname>apache_getenv</refname>
<refpurpose>Get an Apache subprocess_env variable</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>apache_getenv</methodname>
<methodparam><type>string</type><parameter>variable</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>walk_to_top</parameter></methodparam>
</methodsynopsis>
<para>
<function>apache_getenv</function> returns the value of the Apache
environment variable specified by <parameter>variable</parameter>, or
&false; on failure.
</para>
<note>
<para>
<function>apache_getenv</function> is only defined when using
Apache 2.
</para>
</note>
<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>
See also <function>apache_setenv</function>,
<function>getenv</function>&listendand;
<link linkend="language.variables.superglobals">Superglobals</link>.
</para>
</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
-->