Page 1 of 1

How to use .Net assembly in php ?

Posted: Tue Oct 05, 2010 7:19 am
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

Re: How to use .Net assembly in php ?

Posted: Tue Oct 05, 2010 8:54 am
by Benjamin
:arrow: Moved to Installation and Configuration

Re: How to use .Net assembly in php ?

Posted: Tue Oct 05, 2010 12:14 pm
by John Cartwright
What specifically are you having trouble with? Post your code.

Re: How to use .Net assembly in php ?

Posted: Tue Oct 05, 2010 10:25 pm
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

Re: How to use .Net assembly in php ?

Posted: Wed Oct 06, 2010 4:24 am
by tamilmani
How to add the .net assemblies in xampp server?