Sophie

Sophie

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

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
>maxdb_debug</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="MaxDB PHP Extension"
HREF="ref.maxdb.html"><LINK
REL="PREVIOUS"
TITLE="maxdb_data_seek"
HREF="function.maxdb-data-seek.html"><LINK
REL="NEXT"
TITLE="maxdb_disable_reads_from_master"
HREF="function.maxdb-disable-reads-from-master.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.maxdb-data-seek.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.maxdb-disable-reads-from-master.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.maxdb-debug"
></A
>maxdb_debug</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN110263"
></A
><P
>    (PECL)</P
>maxdb_debug&nbsp;--&nbsp;Performs debugging operations</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN110266"
></A
><H2
>Description</H2
>void <B
CLASS="methodname"
>maxdb_debug</B
> ( string debug )<BR
></BR
><P
>&#13;   The <B
CLASS="function"
>maxdb_debug()</B
> can be used to trace the SQLDBC communication. The following
   strings can be used as a parameter to <B
CLASS="function"
>maxdb_debug()</B
>:
  </P
><P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
>TRACE SHORT ON|OFF - Enables/disables method call trace.</TD
></TR
><TR
><TD
>TRACE LONG ON|OFF - Enables/disables method argument and detail debug trace.</TD
></TR
><TR
><TD
>TRACE PACKET ON|OFF|&#60;size&#62; - Enables/disables packet trace, limiting the size of the
           traced object to the specified number of bytes, or 1000 if no size is specified.</TD
></TR
><TR
><TD
>TRACE SQL ON|OFF - Enables/disables high level api trace.</TD
></TR
><TR
><TD
>TRACE TIMESTAMP ON|OFF - Enables/disables a timestamp prefix on each line that is
           traced.</TD
></TR
><TR
><TD
>TRACE SIZE &#60;size&#62; - Limits the size of the trace file to &#60;size&#62; bytes,
           at least 8192 bytes are required.</TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN110284"
></A
><H2
>Return values</H2
><P
>&#13;   <B
CLASS="function"
>maxdb_debug()</B
> doesn't return any value.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN110288"
></A
><H2
>Example</H2
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN110290"
></A
><P
><B
>例 1. Procedural style</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br /><br />maxdb_debug</font><font color="#007700">(</font><font color="#DD0000">"trace packet 200"</font><font color="#007700">);<br /><br /></font><font color="#0000BB">$link </font><font color="#007700">= </font><font color="#0000BB">maxdb_connect</font><font color="#007700">(</font><font color="#DD0000">"localhost"</font><font color="#007700">, </font><font color="#DD0000">"MONA"</font><font color="#007700">, </font><font color="#DD0000">"RED"</font><font color="#007700">, </font><font color="#DD0000">"DEMODB"</font><font color="#007700">);<br /><br /></font><font color="#FF8000">/* check connection */<br /></font><font color="#007700">if (!</font><font color="#0000BB">$link</font><font color="#007700">) {<br />&nbsp;&nbsp;&nbsp;</font><font color="#0000BB">printf</font><font color="#007700">(</font><font color="#DD0000">"Connect failed: %s\n"</font><font color="#007700">, </font><font color="#0000BB">maxdb_connect_error</font><font color="#007700">());<br />&nbsp;&nbsp;&nbsp;exit();<br />}<br /><br /></font><font color="#FF8000">/* close connection */<br /></font><font color="#0000BB">maxdb_close</font><font color="#007700">(</font><font color="#0000BB">$link</font><font color="#007700">);<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><P
>&#13;   The above example produces no output.
  </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.maxdb-data-seek.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.maxdb-disable-reads-from-master.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>maxdb_data_seek</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.maxdb.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>maxdb_disable_reads_from_master</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>