php-doc-en/reference/info/functions/getenv.xml
LEE Yun-young f89ca18be5 Sorry, mistaked. revert.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146724 c90b9560-bf6c-de11-be94-00142212c4b1
2003-12-18 11:47:08 +00:00

67 lines
1.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/info.xml, last change in rev 1.2 -->
<refentry id="function.getenv">
<refnamediv>
<refname>getenv</refname>
<refpurpose>Gets the value of an environment variable</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>getenv</methodname>
<methodparam><type>string</type><parameter>varname</parameter></methodparam>
</methodsynopsis>
<para>
Returns the value of the environment variable
<parameter>varname</parameter>, or &false; on an error.
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
$ip = getenv("REMOTE_ADDR"); // get the ip number of the user
?>
]]>
</programlisting>
</informalexample>
</para>
<para>
You can see a list of all the environmental variables by using
<function>phpinfo</function>. You can find out what many of them
mean by taking a look at the <ulink url="&url.cgispecs;">CGI
specification</ulink>, specifically the <ulink
url="&url.cgispec;">page on environmental variables</ulink>.
</para>
<para>
<note>
<para>
This function does not work in ISAPI mode.
</para>
</note>
</para>
<para>
See also <function>putenv</function>.
</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
-->