手机
当前位置:查字典教程网 >编程开发 >php教程 >php实例分享之html转为rtf格式
php实例分享之html转为rtf格式
摘要:核心代码:复制代码代码如下:PreserveImages=true;$html2RTFCom->PageNumbers=1;$html2RT...

核心代码:

复制代码 代码如下:

<->PreserveImages = true;

$html2RTFCom->PageNumbers = 1;

$html2RTFCom->PageNumbersAlignH = 1;

$html2RTFCom->PageNumbersAlignV = 5;

$htmlFile = "a.html";

$rtfFile = "a.rtf";

$result =$html2RTFCom->ConvertFile($htmlFile,$rtfFile, "head", "foot");

print($result);

unset($html2RTFCom);

echo "done";

?>

可能遇到的问题 Fatal error: Class 'COM' not found in ×××

解决办法:

·将php_com_dotnet.dll复制到php根目录ext文件夹下

·php.ini 确保有此语句

[PHP_COM_DOTNET]

extension=php_com_dotnet.dll

·确保 COM+ Event System 的服务开启

【php实例分享之html转为rtf格式】相关文章:

php实现将上传word文件转为html的方法

将数字格式的计算结果转为汉字格式

php实现读取内存顺序号

浅谈PHP语法(1)

php实现的IMEI限制的短信验证码发送类

PHP脚本的10个技巧(5)

php遍历CSV类实例

PHP4在WinXP下IIS和Apache2服务器上的安装实例

十天学会php之第五天

php备份数据库类分享

精品推荐
分类导航