philip          Tue Jan 18 12:53:30 2005 EDT

  Modified files:              
    /phpdoc/en/reference/info/functions getenv.xml 
  Log:
  Refer to Superglobals in example and seealso.
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/info/functions/getenv.xml?r1=1.7&r2=1.8&ty=u
Index: phpdoc/en/reference/info/functions/getenv.xml
diff -u phpdoc/en/reference/info/functions/getenv.xml:1.7 
phpdoc/en/reference/info/functions/getenv.xml:1.8
--- phpdoc/en/reference/info/functions/getenv.xml:1.7   Thu Sep 16 04:27:44 2004
+++ phpdoc/en/reference/info/functions/getenv.xml       Tue Jan 18 12:53:28 2005
@@ -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 @@
      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>

Reply via email to