這期內(nèi)容當中小編將會給大家?guī)碛嘘P(guān)使用php怎么將word文件轉(zhuǎn)換為html,文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
成都創(chuàng)新互聯(lián)擁有一支富有激情的企業(yè)網(wǎng)站制作團隊,在互聯(lián)網(wǎng)網(wǎng)站建設(shè)行業(yè)深耕十多年,專業(yè)且經(jīng)驗豐富。十多年網(wǎng)站優(yōu)化營銷經(jīng)驗,我們已為超過千家中小企業(yè)提供了網(wǎng)站設(shè)計、成都做網(wǎng)站解決方案,按需設(shè)計網(wǎng)站,設(shè)計滿意,售后服務(wù)無憂。所有客戶皆提供一年免費網(wǎng)站維護!上傳頁面:
文件上傳
接收頁面:
接收上傳文件 Open($connstr); $uploaddir = 'uploads/'; if(!is_dir($uploaddir)){ mkdir($uploaddir); } $filename =$_FILES['filename']['name']; $filename =substr($_FILES['filename']["name"],0,strpos($_FILES['filename']["name"],".")); echo $filename; echo "
"; $uploadfile = $uploaddir.$filename.substr($_FILES['filename']["name"],strpos($_FILES['filename']["name"],".")); //目錄名.文件名.后綴名 echo $uploadfile; echo "
"; $temploadfile = $_FILES['filename']['tmp_name']; echo $temploadfile; echo "
"; move_uploaded_file($temploadfile , $uploadfile); //移動文件 $path = $_SERVER['SCRIPT_FILENAME']; $filepath = $_SERVER["PHP_SELF"]; $path = substr($path,0,strpos($path,$filepath)); echo $path; echo "
"; echo $filepath; $htmlpath = $path."/shiyan4/".$uploadfile; echo "
"; echo $htmlpath; word2html($htmlpath); //$query =@mysql_query( "Insert into $username(fname,file)values('$filename','$uploadfile')")or die("error"); ?> visible = 1 ; $word->Documents->Open($wfilepath)or die("無法打開這個文件"); $htmlpath=substr($wfilepath,0,-4); $word->ActiveDocument->SaveAs($htmlpath,8); $word->quit(0); } print( "Word轉(zhuǎn)html完成!" ); ?>
上述就是小編為大家分享的使用php怎么將word文件轉(zhuǎn)換為html了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。