Funkcje Tidy
PHP Manual

tidy_get_status

(PHP 5, PECL tidy:0.5.2-1.2)

tidy_get_status Zwraca status określonego dokumentu

Opis

Styl proceduralny:

int tidy_get_status ( tidy $obiekt )

Styl zorientowany obiektowo:

int tidy->getStatus ( void )

tidy_get_status() zwraca status określonego obiektu tidy. Zwraca 0 jeśli nie został zgłoszony żaden błąd/ostrzeżenie, 1 dla ostrzeżeń lub dostępnych błędów, lub 2 dla błędów.

Example #1 Przykład tidy_get_status()

<?php
$html 
'<p>paragraph</i>';
$tidy tidy_parse_string($html);

$html2 '<bogus>test</bogus>';
$tidy2 tidy_parse_string($html2);

echo 
tidy_get_status($tidy); //1

echo tidy_get_status($tidy2); //2
?>


Funkcje Tidy
PHP Manual