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



RSS Twitter
Articles Php Functions

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

by: Jayesh Jain
|
November 5, 2002

Examining the Code

First we shall create a COM object for the object we just installed and registered, as COM interop makes the .NET assembly look like COM objects we can use the same syntax as we use to create COM objects in PHP.

<?php
$MyObj 
= new COM ("phpclass.HealthRecord.patient");
?>
We shall now set the lmp property to a valid date, which would be used to calculate edd.

<?php
$MyObj
->lmp "05/08/2002";
?>
We shall now output the LMP property in human readable date format and shall also output the calculated EDD property to the browser.

<?php
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.