【发布时间】:2015-11-07 07:42:46
【问题描述】:
实际上我想做的是从我的网页中的 winword 文件中获取内容。 为此,我使用了 exec() 方法,我还尝试了以下代码:
$pCom = new COM("WScript.Shell");
$pShell = $pCom->exec("Notepad.exe");
$sStdOut = $pShell->StdOut->ReadAll; # Standard output
$sStdErr = $pShell->StdErr->ReadAll; # Error
echo($sStdOut);
上面的代码通过一个异常表示:
Fatal error: Class 'COM' not found in D:\xampp\htdocs\test\tests\Notepad.php on line 9
我不知道该怎么做以及如何做到这一点?
【问题讨论】: