PHPBuilder - Using .NET Assembly (Interoperability with COM) Page 5



RSS Twitter
Articles Php Functions

Using .NET Assembly (Interoperability with COM) - Page 5

by: Jayesh Jain
|
November 5, 2002

Adding Assembly to Global Assembly Cache

In order to share the assembly with all the applications it needs to be installed in the GAC (Global Assembly Cache)
gacutil /i c:\tgol\phpclass\bin\phpclass.dll
This utility could be found in C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin (on my computer)
utility window example
[Note] To view all the assembly installed in the GAC on your computer, open your windows explorer and look in assembly folder under windows folder C:\WINNT\assembly ( on my computer) [End Note]

Coding the PHP File

Create a text file with the following content and save the file as phpnet.php in c:\inetpub\wwwroot folder (or your webserver http root folder)

<?php
    $MyObj 
= new COM ("phpclass.HealthRecord.patient");
    
$MyObj->lmp "05/08/2002";
    echo 
"LMP : $MyObj->lmp";
     echo 
"<br />EDD : $MyObj->edd";
?>

« Previous Page
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Jayesh Jain

Comment:



Comment:

(Maximum characters: 1200). You have characters left.