在今天的某个时候,发生了这个错误并且脚本被挂起:
[21-Aug-2013 08:35:06] PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `WScript.shell': CoInitialize has not been called.
' in C:\path\to\my\script.php:357
Stack trace:
#0 C:\path\to\my\script.php(357): com->com('WScript.shell')
#1 {main}
thrown in C:\path\to\my\script.php on line 357
这是导致错误的行(循环运行):
$com = new Com('WScript.shell');
这条线通常运行良好,所以我不会错过任何库。为什么会发生这种情况?