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

search for in the

tidy_get_output> <tidy_config_count
[edit] Last updated: Fri, 25 May 2012

view this page in

tidy_error_count

(PHP 5, PECL tidy >= 0.5.2)

tidy_error_count指定したドキュメントについて発生した Tidy エラーの数を返す

説明

int tidy_error_count ( tidy $object )

指定したドキュメントについて発生した Tidy エラーの数を返します。

パラメータ

object

Tidy オブジェクト。

返り値

エラーの数を返します。

例1 tidy_error_count() の例

<?php
$html 
'<p>test</i>
<bogustag>bogus</bogustag>'
;

$tidy tidy_parse_string($html);

echo 
tidy_error_count($tidy) . "\n"//1

echo $tidy->errorBuffer;
?>

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

1
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 1 column 8 - Warning: discarding unexpected </i>
line 2 column 1 - Error: <bogustag> is not recognized!
line 2 column 1 - Warning: discarding unexpected <bogustag>
line 2 column 16 - Warning: discarding unexpected </bogustag>
line 1 column 1 - Warning: inserting missing 'title' element

参考

  • tidy_access_count() - 指定したドキュメントについて発生したTidyアクセシビリティ警告の数を返す
  • tidy_warning_count() - 指定したドキュメントについて発生した Tidy 警告の数を返す


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

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