mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Documentation by mazzanet
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166988 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a5c3c5d02d
commit
a73260d1d7
2 changed files with 60 additions and 13 deletions
|
@ -1,11 +1,9 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry id="function.apache-getenv">
|
||||
<refnamediv>
|
||||
<refname>apache_getenv</refname>
|
||||
<refpurpose>
|
||||
Get an Apache subprocess_env variable
|
||||
</refpurpose>
|
||||
<refpurpose>Get an Apache subprocess_env variable</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
@ -14,7 +12,29 @@
|
|||
<methodparam><type>string</type><parameter>variable</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>walk_to_top</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
&warn.undocumented.func;
|
||||
<para>
|
||||
<function>apache_getenv</function> returns the value of the Apache
|
||||
environment variable specified by <parameter>variable</parameter>, or
|
||||
&false; on failure.
|
||||
</para>
|
||||
<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>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/apache.xml, last change in rev 1.7 -->
|
||||
<refentry id="function.apache-setenv">
|
||||
<refnamediv>
|
||||
|
@ -8,14 +8,41 @@
|
|||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apache_setenv</methodname>
|
||||
<methodparam><type>string</type><parameter>variable</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>walk_to_top</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>apache_setenv</methodname>
|
||||
<methodparam><type>string</type><parameter>variable</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>walk_to_top</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
&warn.undocumented.func;
|
||||
<function>apache_setenv</function> sets the value of the Apache
|
||||
environment variable specified by
|
||||
<parameter>variable</parameter>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
When setting an Apache environment variable, the corresponding $_SERVER
|
||||
variable is not changed.
|
||||
</para>
|
||||
</note>
|
||||
<example>
|
||||
<title>Setting an Apache environment variable using <function>apache_setenv</function></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
apache_setenv("EXAMPLE_VAR", "Example Value");
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
<function>apache_setenv</function> can be paired up with
|
||||
<function>apache_getenv</function> across seperate pages or for setting
|
||||
variables to pass to Server Side Includes (.shtml) that have been
|
||||
included in PHP scripts.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>apache_getenv</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue