Sophie

Sophie

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

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
>tidy_get_config</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="Tidy Functions"
HREF="ref.tidy.html"><LINK
REL="PREVIOUS"
TITLE="tidy_get_body"
HREF="function.tidy-get-body.html"><LINK
REL="NEXT"
TITLE="tidy_get_error_buffer"
HREF="function.tidy-get-error-buffer.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.tidy-get-body.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.tidy-get-error-buffer.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.tidy-get-config"
></A
>tidy_get_config</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN234396"
></A
><P
>    (PHP 5)</P
>tidy_get_config&nbsp;--&nbsp;
     Get current Tidy configuration
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN234399"
></A
><H2
>Description</H2
><P
>Procedural style:</P
>array <B
CLASS="methodname"
>tidy_get_config</B
> ( tidy object )<BR
></BR
><P
>Object oriented style:</P
>array <B
CLASS="methodname"
>tidy-&#62;getConfig</B
> ( void  )<BR
></BR
><P
>&#13;     <B
CLASS="function"
>tidy_get_config()</B
> returns an array with the
     configuration options in use by the given tidy
     <CODE
CLASS="parameter"
>object</CODE
>.
    </P
><P
>&#13;     For an explanation about each option, visit <A
HREF="http://tidy.sourceforge.net/docs/quickref.html"
TARGET="_top"
>http://tidy.sourceforge.net/docs/quickref.html</A
>.
    </P
><P
>&#13;     <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN234419"
></A
><P
><B
>例 1. <B
CLASS="function"
>tidy_get_config()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
<font color="#0000BB">&lt;?php<br />$html </font><font color="#007700">= </font><font color="#DD0000">'&lt;p&gt;test&lt;/p&gt;'</font><font color="#007700">;<br /></font><font color="#0000BB">$config </font><font color="#007700">= array(</font><font color="#DD0000">'indent' </font><font color="#007700">=&gt; </font><font color="#0000BB">TRUE</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'output-xhtml' </font><font color="#007700">=&gt; </font><font color="#0000BB">TRUE</font><font color="#007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#DD0000">'wrap' </font><font color="#007700">=&gt; </font><font color="#0000BB">200</font><font color="#007700">);<br /><br /></font><font color="#0000BB">$tidy </font><font color="#007700">= </font><font color="#0000BB">tidy_parse_string</font><font color="#007700">(</font><font color="#0000BB">$html</font><font color="#007700">, </font><font color="#0000BB">$config</font><font color="#007700">);<br /><br /></font><font color="#0000BB">print_r</font><font color="#007700">(</font><font color="#0000BB">tidy_get_config</font><font color="#007700">(</font><font color="#0000BB">$tidy</font><font color="#007700">));<br /></font><font color="#0000BB">?&gt;</font>
</font>
</code></TD
></TR
></TABLE
><P
>上例将输出:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="screen"
>Array
(
    [indent-spaces] =&#62; 2
    [wrap] =&#62; 200
    [tab-size] =&#62; 8
    [char-encoding] =&#62; 1
    [input-encoding] =&#62; 3
    [output-encoding] =&#62; 1
    [newline] =&#62; 1
    [doctype-mode] =&#62; 1
    [doctype] =&#62; 
    [repeated-attributes] =&#62; 1
    [alt-text] =&#62; 
    [slide-style] =&#62; 
    [error-file] =&#62; 
    [output-file] =&#62; 
    [write-back] =&#62; 
    [markup] =&#62; 1
    [show-warnings] =&#62; 1
    [quiet] =&#62; 
    [indent] =&#62; 1
    [hide-endtags] =&#62; 
    [input-xml] =&#62; 
    [output-xml] =&#62; 1
    [output-xhtml] =&#62; 1
    [output-html] =&#62; 
    [add-xml-decl] =&#62; 
    [uppercase-tags] =&#62; 
    [uppercase-attributes] =&#62; 
    [bare] =&#62; 
    [clean] =&#62; 
    [logical-emphasis] =&#62; 
    [drop-proprietary-attributes] =&#62; 
    [drop-font-tags] =&#62; 
    [drop-empty-paras] =&#62; 1
    [fix-bad-comments] =&#62; 1
    [break-before-br] =&#62; 
    [split] =&#62; 
    [numeric-entities] =&#62; 
    [quote-marks] =&#62; 
    [quote-nbsp] =&#62; 1
    [quote-ampersand] =&#62; 1
    [wrap-attributes] =&#62; 
    [wrap-script-literals] =&#62; 
    [wrap-sections] =&#62; 1
    [wrap-asp] =&#62; 1
    [wrap-jste] =&#62; 1
    [wrap-php] =&#62; 1
    [fix-backslash] =&#62; 1
    [indent-attributes] =&#62; 
    [assume-xml-procins] =&#62; 
    [add-xml-space] =&#62; 
    [enclose-text] =&#62; 
    [enclose-block-text] =&#62; 
    [keep-time] =&#62; 
    [word-2000] =&#62; 
    [tidy-mark] =&#62; 
    [gnu-emacs] =&#62; 
    [gnu-emacs-file] =&#62; 
    [literal-attributes] =&#62; 
    [show-body-only] =&#62; 
    [fix-uri] =&#62; 1
    [lower-literals] =&#62; 1
    [hide-comments] =&#62; 
    [indent-cdata] =&#62; 
    [force-output] =&#62; 1
    [show-errors] =&#62; 6
    [ascii-chars] =&#62; 1
    [join-classes] =&#62; 
    [join-styles] =&#62; 1
    [escape-cdata] =&#62; 
    [language] =&#62; 
    [ncr] =&#62; 1
    [output-bom] =&#62; 2
    [replace-color] =&#62; 
    [css-prefix] =&#62; 
    [new-inline-tags] =&#62; 
    [new-blocklevel-tags] =&#62; 
    [new-empty-tags] =&#62; 
    [new-pre-tags] =&#62; 
    [accessibility-check] =&#62; 0
    [vertical-space] =&#62; 
    [punctuation-wrap] =&#62; 
    [merge-divs] =&#62; 1
)</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
    </P
><P
>&#13;     See also <A
HREF="function.tidy-reset-config.html"
><B
CLASS="function"
>tidy_reset_config()</B
></A
> and
     <A
HREF="function.tidy-save-config.html"
><B
CLASS="function"
>tidy_save_config()</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.tidy-get-body.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.tidy-get-error-buffer.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>tidy_get_body</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.tidy.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>tidy_get_error_buffer</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>