久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      PHP如何將上傳word文件轉化為Html格式

      php word轉化為html的實現(xiàn)方法:首先通過composer安裝PHPOffice;然后查看vendor文件夾;最后通過“$xmlWriter ->save('./ceshi.htm');”方式將word文件轉化為Html格式。

      PHP如何將上傳word文件轉化為Html格式

      推薦:《PHP視頻教程》

      方法一: 通過PHPOffice(推薦)

      1:    composer require phpoffice/phpword                                                 /*  通過composer安裝 PHPOffice                                                  需要科學上網(wǎng)                                                或者用中國鏡像:https://www.phpcomposer.com/                                             */     2:  安裝成功可看到 vendor文件夾    3: 使用方法 : <?php      require 'vendor/autoload.php';     $phpWord = PhpOfficePhpWordIOFactory::load('./4.docx');     $xmlWriter = PhpOfficePhpWordIOFactory::createWriter($phpWord, "HTML");     $xmlWriter ->save('./ceshi.htm');              4:官方            /*            官方案例:https://phpword.readthedocs.io/en/latest/general.html            github: https://github.com/PHPOffice/PhpSpreadsheet           */

      方法二:通過python

      from win32com import client as wc import sys  def saveHtm(): 	# print(wordPath) 	# print(htmPath) 	wordPath='E:/1.doc' 	htmPath='E:/1.htm' 	word = wc.Dispatch('Word.Application') 	print(word)  	doc = word.Documents.Open('E:/1.doc') 	doc.SaveAs("E:/1.htm", 8)               //轉化為htm格式      doc.SvaeAs("E:/1.fpt",17)                  	doc.Close()  	word.Quit()  if __name__ == '__main__': 	saveHtm()

      方法三:同時Offic API直接在網(wǎng)頁顯示word文檔

      <iframe      src="http://view.officeapps.live.com/op/view.aspx?src=公網(wǎng)上能訪問的word文檔地址" ></iframe>  例 src="http://view.officeapps.live.com/op/view.aspxsrc=newteach.pbworks.com%2Ff%2Fele%2Bnewsletter.docx"

      方法四:通過com組件

      需要所在宿主機,有offic的環(huán)境,Linxu下不能使用  (不推薦)

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號