tidy_parse_file

(PHP 5)

tidy_parse_file --  Parse markup in file or URI

Description

Procedural style:

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

Object oriented style:

bool tidy->parseFile ( string filename [, mixed config [, string encoding [, bool use_include_path]]] )

This function parses the given file.

Parameter config sa m�e posla� bu� ako pole alebo ako re�azec. Ak ho po�lete ako re�azec, tak m� v�znam ako n�zov konfigura�n�ho s�boru, inak sa interpretuje ako vo�by samotn�. Prejdite si http://tidy.sourceforge.net/docs/quickref.html pre vysvetlenie o ka�dej vo�be.

Parameter encoding nastavuje k�dovanie pre vstupno/v�stupn� dokumenty. Mo�n� hodnoty pre encoding s�: ascii, latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16, utf16le, utf16be, big5 a shiftjis.

Príklad 1. tidy_parse_file() example

<?php
$tidy
= tidy_parse_file('file.html');

$tidy->cleanRepair();
    
if(!empty(
$tidy->errorBuffer)) {
    echo
"The following errors or warnings occured:\n";
    echo
$tidy->errorBuffer;
}
?>

Poznámka: Volite�n� parametre config a encoding boli pridan� v Tidy 2.0.

See also tidy_parse_string(), tidy_parse_string() and tidy_repair_string().