Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

tidy::__construct

(no version information, might be only in CVS)

tidy::__construct --  Constructs a new tidy object

Description

tidy tidy::__construct ( [string filename [, mixed config [, string encoding [, bool use_include_path]]]] )

tidy::__construct() constructs a new tidy object.

If the filename parameter is given, this function will also read that file and initialize the object with the file, acting like tidy_parse_file().

Параметр config может быть передан как в виде строки, так и в виде массива. В случае передачи строки, параметр рассматривается как путь к конфигурационному файлу, в противном случае содержание массива рассматривается как собственно конфигурация. За подробной информацией о опциях обращайтесь к http://tidy.sourceforge.net/docs/quickref.html.

Возможные значения параметра encoding: ascii, latin1, raw, utf8, iso2022, mac, win1252, utf16le, utf16be, utf16, big5 и shiftjis.

Пример 1. tidy::__construct() example

<?php

$html
= <<< HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title>title</title></head>
<body>
<p>paragraph <bt />
text</p>
</body></html>

HTML;

$tidy = new tidy;
$tidy->parseString($html);

$tidy->CleanRepair();

if (
$tidy->errorBuffer) {
    echo
"The following errors were detected:\n";
    echo
$tidy->errorBuffer;
}

?>

Результат выполнения данного примера:

The following errors were detected:
line 8 column 14 - Error: <bt> is not recognized!
line 8 column 14 - Warning: discarding unexpected <bt>

See also tidy_parse_file() and tidy_parse_string().



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

tidy_diagnose> <tidy_config_count
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571