Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 3787

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>phpinfo</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="PHP Options&Information"
HREF="ref.info.html"><LINK
REL="PREVIOUS"
TITLE="phpcredits"
HREF="function.phpcredits.html"><LINK
REL="NEXT"
TITLE="phpversion"
HREF="function.phpversion.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.phpcredits.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.phpversion.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.phpinfo"
></A
>phpinfo</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN182114"
></A
><P
>    (PHP 3, PHP 4, PHP 5)</P
>phpinfo&nbsp;--&nbsp;Outputs lots of PHP information</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN182117"
></A
><H2
>说明</H2
>bool <B
CLASS="methodname"
>phpinfo</B
> ( [int what] )<BR
></BR
><P
>&#13;   Outputs a large amount of information about the current state of  PHP. 
   This includes information about PHP compilation options and extensions,
   the PHP version, server information and environment (if compiled as a
   module), the PHP environment, OS version information, paths, master and
   local values of configuration options, HTTP headers, and the PHP License.
  </P
><P
>&#13;   Because every system is setup differently, <B
CLASS="function"
>phpinfo()</B
> is
   commonly used to check <A
HREF="configuration.html"
>configuration settings</A
> and for available
   <A
HREF="language.variables.predefined.html"
>predefined variables</A
>
   on a given system.
  </P
><P
>&#13;   <B
CLASS="function"
>phpinfo()</B
> is also a valuable debugging tool as it
   contains all EGPCS (Environment, GET, POST, Cookie, Server) data.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN182132"
></A
><H2
>参数</H2
><P
>&#13;   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><CODE
CLASS="parameter"
>what</CODE
></DT
><DD
><P
>&#13;       The output may be customized by passing one or more of the
       following <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>constants</I
></SPAN
> bitwise values summed
       together in the optional <CODE
CLASS="parameter"
>what</CODE
> parameter.
       One can also combine the respective constants or bitwise values
       together with the <A
HREF="language.operators.bitwise.html"
>or</A
> operator.
      </P
><P
>&#13;       <DIV
CLASS="table"
><A
NAME="AEN182145"
></A
><P
><B
>表 1. <B
CLASS="function"
>phpinfo()</B
> options</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><THEAD
><TR
><TH
>Name (constant)</TH
><TH
>Value</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
>INFO_GENERAL</TD
><TD
>1</TD
><TD
>&#13;            The configuration line, <TT
CLASS="filename"
>php.ini</TT
> location, build date, Web
            Server, System and more.
           </TD
></TR
><TR
><TD
>INFO_CREDITS</TD
><TD
>2</TD
><TD
>&#13;            PHP Credits.  See also <A
HREF="function.phpcredits.html"
><B
CLASS="function"
>phpcredits()</B
></A
>.
           </TD
></TR
><TR
><TD
>INFO_CONFIGURATION</TD
><TD
>4</TD
><TD
>&#13;            Current Local and Master values for PHP directives.  See
            also <A
HREF="function.ini-get.html"
><B
CLASS="function"
>ini_get()</B
></A
>.
           </TD
></TR
><TR
><TD
>INFO_MODULES</TD
><TD
>8</TD
><TD
>&#13;            Loaded modules and their respective settings.  See also
            <A
HREF="function.get-loaded-extensions.html"
><B
CLASS="function"
>get_loaded_extensions()</B
></A
>.
           </TD
></TR
><TR
><TD
>INFO_ENVIRONMENT</TD
><TD
>16</TD
><TD
>&#13;            Environment Variable information that's also available in
            <CODE
CLASS="varname"
>$_ENV</CODE
>.
           </TD
></TR
><TR
><TD
>INFO_VARIABLES</TD
><TD
>32</TD
><TD
>&#13;            Shows all <A
HREF="language.variables.predefined.html"
>&#13;            predefined variables</A
> from EGPCS (Environment, GET,
            POST, Cookie, Server).
           </TD
></TR
><TR
><TD
>INFO_LICENSE</TD
><TD
>64</TD
><TD
>&#13;            PHP License information.  See also the <A
HREF="http://www.php.net/license/"
TARGET="_top"
>license FAQ</A
>.
           </TD
></TR
><TR
><TD
>INFO_ALL</TD
><TD
>-1</TD
><TD
>&#13;            Shows all of the above.  This is the default value.
           </TD
></TR
></TBODY
></TABLE
></DIV
>
      </P
></DD
></DL
></DIV
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN182194"
></A
><H2
>返回值</H2
><P
>&#13;   如果成功则返回 <TT
CLASS="constant"
><B
>TRUE</B
></TT
>,失败则返回 <TT
CLASS="constant"
><B
>FALSE</B
></TT
>。
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN182199"
></A
><H2
>范例</H2
><P
>&#13;   <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN182202"
></A
><P
><B
>例 1. <B
CLASS="function"
>phpinfo()</B
> Example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br /></font><font color="#FF8000">// Show all information, defaults to INFO_ALL<br /></font><font color="#0000BB">phpinfo</font><font color="#007700">();<br /><br /></font><font color="#FF8000">// Show just the module information.<br />// phpinfo(8) yields identical results.<br /></font><font color="#0000BB">phpinfo</font><font color="#007700">(</font><font color="#0000BB">INFO_MODULES</font><font color="#007700">);<br /><br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN182206"
></A
><H2
>注释</H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
    Parts of the information displayed are disabled when the
    <A
HREF="ini.core.html#ini.expose-php"
>expose_php</A
> configuration setting
    is set to <TT
CLASS="literal"
>off</TT
>. This includes the PHP and Zend logos,
    and the credits.
   </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
    <B
CLASS="function"
>phpinfo()</B
> outputs plain text instead of HTML when
    using the CLI mode.
   </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN182215"
></A
><H2
>参见</H2
><P
>&#13;   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><A
HREF="function.phpversion.html"
><B
CLASS="function"
>phpversion()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.phpcredits.html"
><B
CLASS="function"
>phpcredits()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.php-logo-guid.html"
><B
CLASS="function"
>php_logo_guid()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.ini-get.html"
><B
CLASS="function"
>ini_get()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.ini-set.html"
><B
CLASS="function"
>ini_set()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.get-loaded-extensions.html"
><B
CLASS="function"
>get_loaded_extensions()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="language.variables.predefined.html"
>Predefined Variables</A
></TD
></TR
></TBODY
></TABLE
><P
></P
>
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.phpcredits.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.phpversion.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>phpcredits</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.info.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>phpversion</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>