How to use .Net assembly in php ?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
tamilmani
Forum Commoner
Posts: 39
Joined: Tue Apr 01, 2008 2:53 am

How to use .Net assembly in php ?

Post by tamilmani »

Hi,

http://php.net/manual/en/class.dotnet.php

I am referring above link. Here so many examples are there . I don't know how to use the .net assembly in php

Please any one guide me . How to do this ?

Thanks
Tamilmani Mohan
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How to use .Net assembly in php ?

Post by Benjamin »

:arrow: Moved to Installation and Configuration
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: How to use .Net assembly in php ?

Post by John Cartwright »

What specifically are you having trouble with? Post your code.
tamilmani
Forum Commoner
Posts: 39
Joined: Tue Apr 01, 2008 2:53 am

Re: How to use .Net assembly in php ?

Post by tamilmani »

Code: Select all

<?php
$console = new DOTNET("mscorlib", "System.Console");
$varible = $console->ReadLine();
$console->WriteLine( "Varible: " . $varible );
$console->WriteLine();

unset( $varible );
unset( $console );
exit();
?>
When i am run the code in my xampp server. Getting error message like as
Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [CreateInstance] [0x80131513] ' in C:\xampplite\htdocs\test.php:31 Stack trace: #0 C:\xampplite\htdocs\test.php(31): dotnet->dotnet('mscorlib', 'System.Console') #1 {main} thrown in C:\xampplite\htdocs\test.php on line 31
tamilmani
Forum Commoner
Posts: 39
Joined: Tue Apr 01, 2008 2:53 am

Re: How to use .Net assembly in php ?

Post by tamilmani »

How to add the .net assemblies in xampp server?
Post Reply