|
| | |
| Main » 2012 » November » 6 » How to Use a DLL(dynamic link library) in php
10:14 PM How to Use a DLL(dynamic link library) in php |
how to use the .dll file means a dynamic link library can only be make
by .NET tecnology. here we will disscuss that how to use that library in
our php script
first of all make any functional .dll file in .NET and use the following code for use this library in php
NOTE:>> .exe file and .dll files are same in .net but if you
compile and Run your C# program with Main() function then always .exe
file will be generate by the .NET and if you run your C# program without
using Main() function then definitely .NET will produce a .dll file
NOw make a dll file having your own functionality and use following code to use it in your web application
<?php
$myobj= new DOTNET("mscorlib ", "Mycustomclass");
//first parameter is the name of the assembly and second one is your created class name in that //assembly
//now you have a abject of that class created in .NET now easily call the functions of that class by
//passing its parameters and you can recieve the returned value from the dll file in php varriable
$myobj->add_to_windowVar("hahahhhahahha.........");
$windowVar=$myobj->get_windowVar();
printf($windowVar);
//this will print hahahhhahahha.........
?>
|
Category: Web Development |
Views: 345 |
Added by: admin-priyank
| Rating: 5.0/1 |
| |
| | |
|
Calendar |
| « November 2012 » | Su | Mo | Tu | We | Th | Fr | Sa | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| |
|
Our poll |
| | |
|
Statistics |
|
Total online: 1 Guests: 1 Users: 0 | |
|
|