首页 > 代码库 > php配置COM组件正常运行

php配置COM组件正常运行

1. http://www.cnblogs.com/yuanke/p/4973824.html

在php.ini中

a. com.allow_dcom = true

b. extension=php_com_dotnet.dll


2. https://stackoverflow.com/questions/12104775/cant-open-word-doc-with-com-in-php/12105160#12105160

(如果有问题,去看它的回答,有另一种方法 )

  • Execute "dcomcnfg"
  • Open Component Services > Computers > My Computer > DCOM Config
  • Search for Microsoft Office Word 97-2003 Document (it will be something like this translated to your language, so take a while and search for it) 
  • Right-Click on it and open the properties
  • Choose "Identity" tab
  • Normally this is set to "the launching user". You have to change this to "the interactive user" or a admin user of your choice.
  • Apply these new settings and test your COM application. It should work fine now.

 

php配置COM组件正常运行