Пример #1
0
<?php

$tidy = new tidy_doc();
/* Set a number of options */
$tidy->setopt("output-xhtml", true);
$tidy->setopt("fix-uri", true);
$tidy->setopt("uppercase-tags", true);
/* Save the configuration file */
$tidy->save_config("myconfig.tcfg");
Пример #2
0
<?php

$tidy = new tidy_doc();
$opts = array("indent" => 2, "indent-spaces" => 4, "wrap" => 4096);
$tidy->parseFile("function.tidy-get-output.html", $opts);
tidy_clean_repair($tidy);
echo $tidy;
Пример #3
0
<?php

/* Create a new document instance */
$tidy = new tidy_doc();
/* Parse a remote URL via Streams */
$tidy->parseFile("http://www.coggeshall.org/");
/* Clean and repair the HTML document */
$tidy->cleanRepair();
/* Access the error buffer */
$error_buf = $tidy->error_buf;
/* Access the output by object overloading */
echo $tidy;
?>
	
Пример #4
0
<?php

$tidy = new tidy_doc();
$tidy->parseFile("intro2_ex1.html", array("show-body-only" => true));
$tidy->cleanRepair();
echo $tidy;