0
实际上我想要做的是从我的网页中的winword文件中获取内容。 为此,我使用的EXEC()方法,我也尝试下面的代码:exec()用php命令不返回任何值
$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
我不知道该怎么办以及如何做到这一点?
见:http://stackoverflow.com/questions/9299809/php-exec-not-returning和http://stackoverflow.com/questions/9114574/php-exec-does-not-return-产量 – CodeLove