PHP COM Functions
2 posts
• Page 1 of 1
PHP COM Functions
Hi,
I'm new to Phalanger and i'm trying to test all the functionalities that i need for my projects. But when i'm trying COM it says
I've added bellow code to machine.config
and my code is :
I'm new to Phalanger and i'm trying to test all the functionalities that i need for my projects. But when i'm trying COM it says
- Code: Select all
Call to undefined external function 'COM::com', extension 'php_com' (extension not found)
I've added bellow code to machine.config
- Code: Select all
<add assembly="php_com.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="COM" />
and my code is :
- Code: Select all
$obj = new COM ( 'winmgmts://localhost/root/CIMV2' );
$wmi_computersystem = $obj->ExecQuery("Select * from Win32_ComputerSystem");
- Saeid.a
- Posts: 1
- Joined: November 26th, 2013, 8:26 am
Re: PHP COM Functions
Hi,
I'm not sure, if the COM class is included in the bundled php_com.dll. Anyway since Phalanger provides .NET to PHP, it is recommended to use .NET/COM objects directly from PHP, e.g.:
I'm not sure, if the COM class is included in the bundled php_com.dll. Anyway since Phalanger provides .NET to PHP, it is recommended to use .NET/COM objects directly from PHP, e.g.:
- Code: Select all
new System.Management.ManagementObjectSearcher("Select * from Win32_ComputerSystem")
- Code: Select all
<add assembly='System.Management' />
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 15 guests