CakeFest 2024: The Official CakePHP Conference

tidy::getStatus

tidy_get_status

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

tidy::getStatus -- tidy_get_statusBelgenin durumunu döndürür

Açıklama

Nesne yönelimli kullanım

public tidy::getStatus(): int

Yordamsal kullanım

tidy_get_status(tidy $tidy): int

tidy ile belirtilen belgenin durumunu döndürür.

Bağımsız Değişkenler

tidy

Tidy nesnesi.

Dönen Değerler

Bir hata veya uyarı oluşmamışsa 0, uyarılar veya erişilebilirlik hataları için 1, hatalar için 2 döner.

Örnekler

Örnek 1 - tidy::getStatus() örneği

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

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

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

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

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top