andyhu/mht2html

此包已被弃用且不再维护。未建议替代包。

MHT 转 HTML 转换器

dev-master 2013-05-31 09:13 UTC

This package is not auto-updated.

Last update: 2024-04-08 11:22:40 UTC


README

一个快速且内存高效的 PHP 类,用于将 MHT 文件转换为 HTML(及图片)

用法

require('MthToHtml.php');
$mth = new MhtToHtml('./mthfile.mht', './output' /* output directory, default to './html' */);

// optional, save images using images' md5 as name, around 2 times slower but can make sure there's no duplicate images saved
// $mth->setReplaceImageName(true);

$time = microtime(true);
$mth->parse();
$time = microtime(true) - $time;
echo 'Time Used: ', $time, PHP_EOL, 'Peak Memory:', memory_get_peak_usage();