如何使用这个 HTMLTidy 类?
示例:我想美化$input
包含 HTML 的变量。我试过这个:
$input = "<html><head><title>The Last Page of the Internet</title></head><body><center><h1><b><u>Attention:</u></b></h1><p><br><strong>You have reached the very last page of the Internet.</strong></p><p><br><strong>We hope you have enjoyed your browsing.</strong></p><p><br><strong>Now turn off your computer and go outside.</strong></p></center></body></html>";
include ('class.htmltidy.php');
$html = htmltidy($input);
echo $html;
但这行不通。
HTMLTidy 类的源代码可以在这里找到。