Sophie

Sophie

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

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
>ob_get_status</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="Output Control 输出控制函数"
HREF="ref.outcontrol.html"><LINK
REL="PREVIOUS"
TITLE="ob_get_level"
HREF="function.ob-get-level.html"><LINK
REL="NEXT"
TITLE="ob_gzhandler"
HREF="function.ob-gzhandler.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.ob-get-level.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.ob-gzhandler.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.ob-get-status"
></A
>ob_get_status</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN165715"
></A
><P
>    (PHP 4 &#62;= 4.2.0, PHP 5)</P
>ob_get_status&nbsp;--&nbsp;
     Get status of output buffers
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN165718"
></A
><H2
>Description</H2
>array <B
CLASS="methodname"
>ob_get_status</B
> ( [bool full_status=<I
CLASS="initializer"
>FALSE</I
>] )<BR
></BR
><P
>&#13;     <B
CLASS="function"
>ob_get_status()</B
> returns status information on
     either the top level output buffer or all active output buffer levels
     if <CODE
CLASS="parameter"
>full_status</CODE
> is set to <TT
CLASS="constant"
><B
>TRUE</B
></TT
>.
    </P
><P
>&#13;     If called without the <CODE
CLASS="parameter"
>full_status</CODE
> parameter
     or with <CODE
CLASS="parameter"
>full_status</CODE
> = <TT
CLASS="constant"
><B
>FALSE</B
></TT
> a simple array
     with the following elements is returned:
    </P
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN165735"
></A
><P
><B
>例 1. Simple <B
CLASS="function"
>ob_get_status()</B
> output</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="screen"
>Array
(
    [level] =&#62; 2
    [type] =&#62; 0
    [status] =&#62; 0
    [name] =&#62; URL-Rewriter
    [del] =&#62; 1
)</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><P
>&#13;     <P
><B
>Simple <B
CLASS="function"
>ob_get_status()</B
> results</B
></P
><P
><B
>Key: </B
>level</P
><P
><B
>Value: </B
>Output nesting level</P
><P
><B
>Key: </B
>type</P
><P
><B
>Value: </B
><TT
CLASS="literal"
>PHP_OUTPUT_HANDLER_INTERNAL (0)</TT
> or <TT
CLASS="literal"
>PHP_OUTPUT_HANDLER_USER (1)</TT
></P
><P
><B
>Key: </B
>status</P
><P
><B
>Value: </B
>One of <TT
CLASS="literal"
>PHP_OUTPUT_HANDLER_START</TT
> (0), <TT
CLASS="literal"
>PHP_OUTPUT_HANDLER_CONT</TT
> (1) or <TT
CLASS="literal"
>PHP_OUTPUT_HANDLER_END</TT
> (2)</P
><P
><B
>Key: </B
>name</P
><P
><B
>Value: </B
>Name of active output handler or ' default output handler' if none is set</P
><P
><B
>Key: </B
>del</P
><P
><B
>Value: </B
>Erase-flag as set by <A
HREF="function.ob-start.html"
><B
CLASS="function"
>ob_start()</B
></A
></P
>
    </P
><P
>&#13;     If called with <CODE
CLASS="parameter"
>full_status</CODE
> = <TT
CLASS="constant"
><B
>TRUE</B
></TT
> an array 
     with one element for each active output buffer level is returned.
     The output level is used as key of the top level array and each array 
     element itself is another array holding status information
     on one active output level.
    </P
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN165769"
></A
><P
><B
>例 2. Full <B
CLASS="function"
>ob_get_status()</B
> output</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="screen"
>Array
(
    [0] =&#62; Array
        (
            [chunk_size] =&#62; 0
            [size] =&#62; 40960
            [block_size] =&#62; 10240
            [type] =&#62; 1
            [status] =&#62; 0
            [name] =&#62; default output handler
            [del] =&#62; 1
        )

    [1] =&#62; Array
        (
            [chunk_size] =&#62; 0
            [size] =&#62; 40960
            [block_size] =&#62; 10240
            [type] =&#62; 0
            [buffer_size] =&#62; 0
            [status] =&#62; 0
            [name] =&#62; URL-Rewriter
            [del] =&#62; 1
        )

)</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><P
>&#13;     The full output contains these additional elements:
     <P
><B
>Full <B
CLASS="function"
>ob_get_status()</B
> results</B
></P
><P
><B
>Key: </B
>chunk_size</P
><P
><B
>Value: </B
>Chunk size as set by <A
HREF="function.ob-start.html"
><B
CLASS="function"
>ob_start()</B
></A
></P
><P
><B
>Key: </B
>size</P
><P
><B
>Value: </B
>...</P
><P
><B
>Key: </B
>blocksize</P
><P
><B
>Value: </B
>...</P
>
    </P
><P
>&#13;     See also <A
HREF="function.ob-get-level.html"
><B
CLASS="function"
>ob_get_level()</B
></A
> and 
     <A
HREF="function.ob-list-handlers.html"
><B
CLASS="function"
>ob_list_handlers()</B
></A
>.
    </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.ob-get-level.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.ob-gzhandler.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>ob_get_level</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.outcontrol.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ob_gzhandler</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>