Php 那里';这是一种计算.doc中字数的方法吗?
我正在尝试用php计算Php 那里';这是一种计算.doc中字数的方法吗?,php,string,ms-word,Php,String,Ms Word,我正在尝试用php计算.doc文档中的字数。 我什么也得不到 有人知道怎么做吗?我需要计算Word文档中的字数 谢谢同样的问题,回答得很好: 您需要: 区分文件类型 $file_name = $_FILES['image']['name']; $file_extn = end(explode(".", strtolower($_FILES['image']['name']))); if($file_extn == "doc" || $file_extn == "docx"){ docx
.doc
文档中的字数。
我什么也得不到
有人知道怎么做吗?我需要计算Word文档中的字数
谢谢同样的问题,回答得很好: 您需要: 区分文件类型
$file_name = $_FILES['image']['name'];
$file_extn = end(explode(".", strtolower($_FILES['image']['name'])));
if($file_extn == "doc" || $file_extn == "docx"){
docx2text();
}elseif($file_extn == "rtf"){
rtf2text();
}
将文档转换为文本
用于文档或用于rtf的docx
数一数单词
我希望这有帮助?可能会重复