PHP和COM:错误“无效的语法” [英] PHP and COM : error "Invalid syntax"

查看:212
本文介绍了PHP和COM:错误“无效的语法”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到提供给我的dll,我没有能力编辑它。
无效语法错误是指dll中的方法还是与php代码相关的东西?

I'm trying to connect to a dll that was supplied to me, I don't have the ability to edit it. Is the "Invalid syntax" error refering to a method within the dll or something with the php code?


try {
    $testConnection = new COM("SomebodySpecial.DLL");
} catch (com_exception $e) {
    echo "
";
    print_r( array( 'errorCode' => $e->getCode(),
                    'errorMessage' => $e->getMessage(),
                    'errorFile' => $e->getFile(),
                    'errorLine' => $e->getLine()));  
    echo "

;
}

[errorCode] => -2147221020
[errorMessage] =>无法创建COM对象SomebodySpecial.DLL:无效语法
[errorFile] = > D:\Inetpub\wwwroot-dev\test.php
[errorLine] => 9

"; } [errorCode] => -2147221020 [errorMessage] => Failed to create COM object `SomebodySpecial.DLL': Invalid syntax [errorFile] => D:\Inetpub\wwwroot-dev\test.php [errorLine] => 9


推荐答案

如错误信息所示,您向 COM 构造函数提供了无效参数。

As the error message indicates, you provided an invalid parameter to the COM constructor.

参数是COM ID,而不是DLL文件名。

这篇关于PHP和COM:错误“无效的语法”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆