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 and 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. Open the console root directory - Component Services - Computer in the Component Services panel. - My Computer - DCOM configuration (as shown below)
3. Find Internet Explorer (Ver 1.0) in the right window, open the properties window, switch to the Security tab
4. Select Customize for "Startup and Activation Permissions" in the Security tab , edit, add the IIS account used by the website or add the Guests group and confirm (as shown below).
5. Restart IIS and you should be able to call IE normally now.
The above introduces Uncaught exception com_exception with message Failed to create COM object, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.