我想用PHP计算ms word(docx)中的单词 [英] I want to count word in ms word(docx) using PHP
问题描述
您好,我的代码下面显示的代码只是试图计算ms字数(docx,doc格式)我在localhost上取代但是在远程服务上我得到了这个错误
[23-Apr-2017 06:45:12 UTC] PHP致命错误:在第170行的/home/afyazone/public_html/demo/doclibrary/class.doccounter.php中找不到类'ZipArchive'
[2017年4月23日09:11:40 UTC] PHP注意:未定义的索引:第9行/home/afyazone/public_html/demo/payment.php中的电子邮件
[23-Apr-2017 10:26:17 UTC] PHP致命错误:在第170行的/home/afyazone/public_html/demo/doclibrary/class.doccounter.php中找不到类'ZipArchive'
[23-Apr-2017 10:39:35 UTC] PHP致命错误:在第170行的/home/afyazone/public_html/demo/doclibrary/class.doccounter.php中找不到类'ZipArchive'
我使用这个库: GitHub - joeblurton / doccounter:一系列用于分析PDF的简单工具。 DOCX,.DOC和.TXT文件。 [ ^ ]
我不知道我哪里出错了,请我帮忙。谢谢
我尝试过:
Hi there, my code below show the code just tried to count number of words in ms word (docx,doc format) I succceed on localhost but on remote serve I get this errors
[23-Apr-2017 06:45:12 UTC] PHP Fatal error: Class 'ZipArchive' not found in /home/afyazone/public_html/demo/doclibrary/class.doccounter.php on line 170
[23-Apr-2017 09:11:40 UTC] PHP Notice: Undefined index: email in /home/afyazone/public_html/demo/payment.php on line 9
[23-Apr-2017 10:26:17 UTC] PHP Fatal error: Class 'ZipArchive' not found in /home/afyazone/public_html/demo/doclibrary/class.doccounter.php on line 170
[23-Apr-2017 10:39:35 UTC] PHP Fatal error: Class 'ZipArchive' not found in /home/afyazone/public_html/demo/doclibrary/class.doccounter.php on line 170
I use this library: GitHub - joeblurton/doccounter: A collection of simple tools for analysing PDF, .DOCX, .DOC and .TXT files.[^]
I don't know where im going wrong, please I need help. Thanks
What I have tried:
require_once("doclibrary/class.doccounter.php");
$countDocx = "";
$sqlCheck = $connect->query("SELECT * FROM temp WHERE email = '".$_SESSION["email"]."' ORDER BY tempid DESC LIMIT 1");
if($sqlCheck->num_rows > 0){
while($loops = $sqlCheck->fetch_assoc()){
$countDocx = $loops["file"];
$_SESSION["docx"] = $loops["file"];
$_SESSION["title"] = $loops["title"];
}
$fileDir = "AuthorReport/".$countDocx;
$doc = new DocCounter();
$doc->setFile("$fileDir");
$words = ($doc->getInfo()->wordCount);
}
推荐答案
countDocx = ;
countDocx = "";
sqlCheck =
sqlCheck =
connect-> query( SELECT * FROM temp WHERE email ='。
connect->query("SELECT * FROM temp WHERE email = '".
这篇关于我想用PHP计算ms word(docx)中的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!