php怎么获取word文档

 时间:2026-02-16 03:28:23

1、打开dw或者记事本

2、<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">;

<html style='width:350px; Height: 140px;'>;

<head>;

<title>;Open A Word& Document</title>;

<style>; html, body, button, div, input, select{ font-family: MS Shell Dlg; font-size: 11px;}; </style>;

<SCRIPT DEFER>;

<!--

function _CloseOnEsc() {if (event.keyCode == 27) { window.close(); return; }} document.body.onkeypress = _CloseOnEsc;

//-->;

</SCRIPT>;

<SCRIPT>;

function openword (){

var pathlength = document.all.filepath.value.length - 4;

var pathisdoc = document.all.filepath.value.lastIndexOf(".doc"); if (pathlength !== pathisdoc){

alert ("您选择的不是一个 Microsoft Word 文档.\n 它的扩展名必须是 .doc");

}

else {

var file = unescape( document.set.filepath.value ) var word

try {


try {


try {


}

}

}

word=new ActiveXObject('Word.Application.9') // word 2k

} catch (e) {

word=new ActiveXObject('Word.Application.8') // word 97

} catch (e) {

word=new ActiveXObject('Word.Application.7') // word 95

} catch (e) {

//WordPad.Document

//word.Visible=true; word.Documents.Open(file); word.Documents(file).Range(0).Copy();

//word.ActiveDocument.SaveAs("H:\Mydoc.doc", 4);

//word.Options.PrintBackground = false;

//word.ActiveDocument.PrintOut(); word.Quit();

window.close();

}

}

</SCRIPT>;

</head>;

<body style="background: threedface; color: windowtext;" margin: 30px; >;

<FORM METHOD="post" NAME="set" ID="set">;

;&&<IMG SRC="../images/ed_word.gif" ALT="

ALIGN="absmiddle">;打开一个 Word& 文档

<DIV>;<INPUT TYPE="file" NAME="filepath" SIZE="30">;

;<INPUT TYPE="button" NAME="btnOK" VALUE="Open" onclick="openword();">;&&<INPUT TYPE="button" NAME="Cancel" VALUE="退出" onclick="window.close();">;</DIV>;

</FORM>;

</body>;

</html>;

3、运行保存网页查看即可

  • php如何打开word文档获取里边内容
  • PHP 如何入门
  • php文件如何引用wordpress方法
  • php程序怎么使用antiword
  • php 博客开发教程
  • 热门搜索
    一筹莫展是什么意思 感同身受是什么意思 花椰菜是什么 汽车封釉是什么意思 神经兮兮什么意思 核酸阳性是什么意思 分析纯是什么意思 我的优点是什么 无量下跌说明什么 护照是什么