国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

php實現將-上傳word文件轉為html的方法

2019-11-02 14:24:14
字體:
來源:轉載
供稿:網友

   本文實例講述了php實現將上傳word文件轉為html的方法。分享給大家供大家參考。具體實現方法如下:

  上傳頁面:

  ?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>文件上傳</title> </head> <body> <form action="receivefile.php" method="post" enctype="multipart/form-data"> <input type="file" name="filename" /> <input type="submit" /> </form> </body> </html>

  接收頁面:

  ?

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 3
天龍影院[www.aikan.tv/special/tianlongyingyuan/]
8 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>接收上傳文件</title> <?php $conn = @new COM("ADODB.Connection"); $connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("person.mdb"); $conn->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 "<br>"; $uploadfile = $uploaddir.$filename.substr($_FILES['filename']["name"],strpos($_FILES['filename']["name"],".")); //目錄名.文件名.后綴名 echo $uploadfile; echo "<br>"; $temploadfile = $_FILES['filename']['tmp_name']; echo $temploadfile; echo "<br>"; move_uploaded_file($temploadfile , $uploadfile); //移動文件 $path = $_SERVER['SCRIPT_FILENAME']; $filepath = $_SERVER["PHP_SELF"]; $path = substr($path,0,strpos($path,$filepath)); echo $path; echo "<br>"; echo $filepath; $htmlpath = $path."/shiyan4/".$uploadfile; echo "<br>"; echo $htmlpath; word2html($htmlpath); //$query [email protected]_query( "Insert into $username(fname,file)values('$filename','$uploadfile')")or die("error"); ?> <?php //http://tieba.baidu.com/f?kz=13975389 function word2html($wfilepath) { $word=new COM("
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 桂林市| 嘉黎县| 察哈| 农安县| 张家口市| 鱼台县| 霍州市| 翁牛特旗| 衡南县| 滨海县| 饶阳县| 东光县| 会同县| 南城县| 云浮市| 合川市| 萨嘎县| 治多县| 洮南市| 广东省| 兴化市| 南漳县| 札达县| 拜城县| 清原| 星座| 石林| 东阳市| 阜城县| 洛川县| 衡东县| 云梦县| 盐山县| 衡阳县| 忻城县| 黑山县| 阳东县| 商水县| 昭觉县| 云阳县| 思南县|