Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: tidy_diagnose - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

tidy_error_count" width="11" height="7"/> <tidy::__construct
Last updated: Mon, 05 Feb 2007

view this page in

tidy_diagnose

(PHP 5)

tidy_diagnose — パース、修正されたマークアップの診断を行う

説明

手続き言語型スタイル:

bool tidy_diagnose ( tidy object )

オブジェクト指向言語型スタイル:

bool tidy->diagnose ( void )

tidy_diagnose() は、 与えられて Tidy オブジェクト object に対して診断テストを実行し、 エラーバッファにドキュメントについての情報を追加します。

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例 2360. tidy_diagnose() の例

<?php

$html
= <<< HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<p>paragraph</p>
HTML;

$tidy = tidy_parse_string($html);
$tidy->CleanRepair();

// 2 つの出力の違いに注意
echo tidy_get_error_buffer($tidy) . "\n";

$tidy->diagnose();
echo
tidy_get_error_buffer($tidy);

?>

上の例の出力は以下となります。


line 5 column 1 - Warning: <p> isn't allowed in <head> elements
line 5 column 1 - Warning: inserting missing 'title' element

line 5 column 1 - Warning: <p> isn't allowed in <head> elements
line 5 column 1 - Warning: inserting missing 'title' element
Info: Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN"
Info: Document content looks like XHTML 1.0 Strict
2 warnings, 0 errors were found!

      

tidy_get_error_buffer() も参照ください。



add a note add a note User Contributed Notes
tidy_diagnose
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites