PHP-COM在IIS中不起作用 [英] PHP - COM does not work in IIS

查看:63
本文介绍了PHP-COM在IIS中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试使COM在运行php的本地iis服务器上工作时遇到问题。这与以前的帖子有关,但是现在我发现COM只是根本不加载任何东西。

I'm having an issue trying to get COM to work on my local iis server running php. This is related to an earlier post but now i am finding COM just simply does not load anything.

我已经尝试过了...
新COM('ADODB.Connection')

I've tried this... new COM( 'ADODB.Connection' )

我也尝试过...
new COM( WScript.Shell)

这两个代码行都不起作用。它们不会抛出错误,只是死掉而不会在代码中进一步执行。我尝试在try-Catch中捕获异常,但未返回任何结果。我猜想COM出了点问题,但是以前从未使用过它,所以我不知道在哪里可以修复或启用它。任何帮助表示赞赏。谢谢。

both of these lines of code will not work. They do not throw errors, just simply die and do not execute any further in the code. I've tried catching an exception in a try-Catch but nothing gets returned. I'm guessing that there is something wrong with COM but have never used it before so I don't know where to look to fix it or enable it. Any help is appreciated. Thanks.

推荐答案

来自安装页面;


自PHP 5.3.15 / 5.4.5起,此扩展名要求在php.ini中启用php_com_dotnet.dll才能使用这些功能。以前的PHP版本默认情况下启用了这些扩展。

As of PHP 5.3.15 / 5.4.5, this extension requires php_com_dotnet.dll to be enabled inside of php.ini in order to use these functions. Previous versions of PHP enabled these extensions by default.

由于您正在运行5.3.19,因此需要在以下位置启用它 php.ini 使用类似的东西;

Since you're running 5.3.19, you'll need to enable it in php.ini using something like;

[COM_DOT_NET] 
extension=php_com_dotnet.dll 

这篇关于PHP-COM在IIS中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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