php教程

tidy::getStatus

tidy_get_status

(PHP 5, PHP 7, PECL tidy >= 0.5.2)

tidy::getStatus -- tidy_get_statusGet status of specified document

说明

面向对象风格

public tidy::getStatus ( void ) : int

过程化风格

tidy_get_status ( tidy $object ) : int

Returns the status for the specified tidy object.

参数

object

The Tidy 对象。

返回值

Returns 0 if no error/warning was raised, 1 for warnings or accessibility errors, or 2 for errors.

范例

Example #1 tidy::getStatus() example

<?php
$html 
'<p>paragraph</i>';
$tidy = new tidy();
$tidy->parseString($html);

$tidy2 = new tidy();
$html2 '<bogus>test</bogus>';
$tidy2->parseString($html2);

echo 
$tidy->getStatus(); //1

echo $tidy2->getStatus(); //2
?>

User Contributed Notes

There are no user contributed notes for this page.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788