Home  >  Article  >  Backend Development  >  Uncaught exception com_exception with message Failed to crea_PHP教程

Uncaught exception com_exception with message Failed to crea_PHP教程

WBOY
WBOYOriginal
2016-07-21 15:21:16761browse

Use the following code to call IE in PHP:

Copy code The code is as follows:

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

Cannot be called normally, an error is reported directly:
Copy code The code is as follows:

Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `InternetExplorer.Application': Access denied.

The reason is that the COM component of IE prohibits access by ordinary accounts by default. The solution is as follows:
1. Open the Control Panel - Management Tools - Component Services
2. In the Component Services panel, click Open the console root directory - Component Services - Computer - My Computer - DCOM Configuration (as shown below)
Uncaught exception com_exception with message Failed to crea_PHP教程
3. Find Internet Explorer (Ver 1.0) in the right window, open the properties window, and switch to Security Tags

4. In the Security tab, select "Startup and Activation Permissions" to customize, edit, add the IIS account used by the website or add the Guests group and confirm (as shown below).
Uncaught exception com_exception with message Failed to crea_PHP教程
5. Restart IIS and you should be able to call IE normally now.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324953.htmlTechArticleUse the following code to call IE in PHP: Copy the code The code is as follows: browser = new COM("InternetExplorer.Application" ); cannot be called normally and reports an error directly: Copy the code as follows:...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn