zoukankan      html  css  js  c++  java
  • php错误:Uncaught exception com_exception with message Failed to create COM object

    本文为大家讲解的是php错误:Uncaught exception com_exception with message Failed to create COM object,感兴趣的同学参考下.

    错误:

    Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `InternetExplorer.Application': 拒绝访问
    在PHP中调用IE使用如下代码:


    browser = new COM("InternetExplorer.Application");


    无法正常调用,直接报错:


    Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `InternetExplorer.Application': 拒绝访问。


    原因是IE的COM组件默认禁止普通帐号访问,解决方法如下:
    1、打开控制面板 - 管理工具 - 组件服务
    2、在组件服务面板中依次打开 控制台根目录 - 组件服务 - 计算机 - 我的电脑 - DCOM 配置(如下图)

    3、在右边窗口中找到 Internet Explorer(Ver 1.0) 打开属性窗口,切换到安全标签

    4、安全标签中“启动和激活权限”选择自定义,编辑,添加网站使用的IIS帐号或添加 Guests组 确定即可(如下图)。

    5、重起IIS,现在应该可以正常调用IE了。

  • 相关阅读:
    HDU 2883 kebab
    CSUOJ 1635 Restaurant Ratings
    CSUOJ 1638 Continued Fraction
    POJ 1852 Ants
    ZOJ 3471 Most Powerful
    CSUOJ 1637 Yet Satisfiability Again!
    如何生成CA证书
    Keepalived实现双机热备
    Nginx负载均衡的优缺点
    负载均衡之 nginx
  • 原文地址:https://www.cnblogs.com/caicaizi/p/6676128.html
Copyright © 2011-2022 走看看