我有一个php页面,里面是html的内容,表格,文字,图片等,网上搜了,说转成mht文件再转成word,我现在转成mht文件了,用浏览器打开正常,图片信息都能显示,但是转成word后就格式不正确,图片也不能显示了,直接用word打开mht文件也不正常,怎么解决呢?请教各位,页面上一定是有图片的,跪求解决方案,在线等!!!

解决方案 »

  1.   

    是不是编码问题??mht 直接word打开显示什么?  贴代码
      

  2.   


    header("Cache-Control: no-cache, must-revalidate"); 
    header("Pragma: no-cache"); 
    $fileContent = '内容'; 
    $fileName = iconv("utf-8", "GBK", '文件名' . '_'. $intro . '_' . rand(100, 999));   
    header("Content-Type: application/doc"); 
    header("Content-Disposition: attachment; filename=" . $fileName . ".doc"); 
    echo $fileContent;原理就这样。
      

  3.   

    iconv("utf-8",  换个编码行不行