2个回答
2013-04-08
展开全部
给你提供一个读取Word内容的代码,自己把读取出来的内容插入数据库:<?
/**
* @desc PHP读取Word文档
*
*/
$word = new COM("word.application") or die ("Could not initialise MS Word object.");
$word->Documents->Open(realpath("asd.doc"));
$content = (string) $word->ActiveDocument->Content; echo $content; //读取Word内容
$word->ActiveDocument->Close(false); $word->Quit();
$word = null;
unset($word);
?>
/**
* @desc PHP读取Word文档
*
*/
$word = new COM("word.application") or die ("Could not initialise MS Word object.");
$word->Documents->Open(realpath("asd.doc"));
$content = (string) $word->ActiveDocument->Content; echo $content; //读取Word内容
$word->ActiveDocument->Close(false); $word->Quit();
$word = null;
unset($word);
?>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询