Пример 1. A libxml_use_internal_errors() example
This example demonstrates the basic usage of libxml errors and the value
returned by this function.
<?php
var_dump(libxml_use_internal_errors(true));
$doc = DOMDocument::load('file.xml');
if (!$doc) {
$errors = libxml_get_errors();
foreach ($errors as $error) {
}
libxml_clear_errors();
}
?>
|
Результат выполнения данного примера: