tidy_repair_file

(no version information, might be only in CVS)

tidy_repair_file --  Repair a file and return it as a string

Description

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

This function repairs the given file and returns it as a string.

Przykład 1. tidy_repair_file() example

<?php
$file
= 'file.html';

$repaired = tidy_repair_file($file);
rename($file, $file . '.bak');

file_put_contents($file, $repaired);
?>

Notatka: Opcjonalne parametry config_options i encoding zostały dodane w Tidy 2.0.

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