当前位置:Gxlcms >
PHP教程 >
使用PHP的tidy_clean_repair()对HTML进行压缩
使用PHP的tidy_clean_repair()对HTML进行压缩
时间:2021-07-01 10:21:17
帮助过:31人阅读
<无详细内容>
- $options = array("clean" => true,
- "drop-proprietary-attributes" => true,
- "drop-font-tags" => true,
- "drop-empty-paras" => true,
- "hide-comments" => true,
- "join-classes" => true,
- "join-styles" => true);
- $tidy = tidy_parse_file("http://www.php.com/", $options);
- tidy_clean_repair($tidy);
- echo $tidy;
- ?>
|