mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Refer to Superglobals in example and seealso.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@177580 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
cb3edbe5f6
commit
0ab5f30df2
1 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- splitted from ./en/functions/info.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.getenv">
|
||||
<refnamediv>
|
||||
|
@ -19,7 +19,11 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$ip = getenv("REMOTE_ADDR"); // get the ip number of the user
|
||||
// Example use of getenv()
|
||||
$ip = getenv('REMOTE_ADDR');
|
||||
|
||||
// Or simply use a Superglobal ($_SERVER or $_ENV)
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -33,7 +37,9 @@ $ip = getenv("REMOTE_ADDR"); // get the ip number of the user
|
|||
url="&url.cgispec;">page on environmental variables</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>putenv</function>.
|
||||
See also <function>putenv</function>,
|
||||
<function>apache_getenv</function>&listendand;
|
||||
<link linkend="language.variables.superglobals">Superglobals</link>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue