tidy_parse_file

(PHP 5)

tidy_parse_file --  Parse markup in file or URI

Description

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

This function parses the given file.

config 인수는 배열이나 문자열을 전달할 수 있습니다. 문자열을 넘기면, 설정 파일의 이름을 의미합니다. 그 외에는 옵션 자체로 해석합니다. 각 옵션의 설명은 http://tidy.sourceforge.net/docs/quickref.html를 확인하십시오. encoding 인수는 입출력 문서의 인코등을 지정합니다. 가능한 encoding 값은: ascii, latin1, raw, utf8, iso2022, mac, win1252, utf16le, utf16be, utf16, big5, shiftjis.

예 1. tidy_parse_file() example

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

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

참고: The optional parameters config and encoding were added in Tidy 2.0.

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