mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
75 lines
3.7 KiB
HTML
75 lines
3.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Returns the Number of Tidy configuration errors encountered for specified document</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.tidy-config-count" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">tidy_config_count</h1>
|
|
<p class="verinfo">(PHP 5, PHP 7, PECL tidy >= 0.5.2)</p><p class="refpurpose"><span class="refname">tidy_config_count</span> — <span class="dc-title">Returns the Number of Tidy configuration errors encountered for specified document</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.tidy-config-count-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>tidy_config_count</strong></span>
|
|
( <span class="methodparam"><span class="type"><a href="class.tidy.html" class="type tidy">tidy</a></span> <code class="parameter">$object</code></span>
|
|
) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Returns the number of errors encountered in the configuration of the
|
|
specified tidy <code class="parameter">object</code>.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.tidy-config-count-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">object</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The <a href="class.tidy.html" class="classname">Tidy</a> 对象。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.tidy-config-count-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns the number of errors.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.tidy-config-count-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-4874">
|
|
<p><strong>Example #1 <span class="function"><strong>tidy_config_count()</strong></span> example</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />$html </span><span style="color: #007700">= </span><span style="color: #DD0000">'<p>test</I>'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$config </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'doctype' </span><span style="color: #007700">=> </span><span style="color: #DD0000">'bogus'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$tidy </span><span style="color: #007700">= </span><span style="color: #0000BB">tidy_parse_string</span><span style="color: #007700">(</span><span style="color: #0000BB">$html</span><span style="color: #007700">, </span><span style="color: #0000BB">$config</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* This outputs 1, because 'bogus' isn't a valid doctype */<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">tidy_config_count</span><span style="color: #007700">(</span><span style="color: #0000BB">$tidy</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |