Using C# class library from PHP

Integrating PHP and C# together. Using .NET libraries from PHP and vice versa.

Using C# class library from PHP

Postby Jakub Misek » January 25th, 2012, 2:44 pm

This sample consists of two projects:
- PHP console application
- C# class library

Notice the PHP project references the C# project. Then you can seamlessly use all the C# goodies written in C# class library from within your PHP project.

Also put some breakpoints in PHP and C# code. It is really interesting how it jumps from one language to another without significant overhead.
You do not have the required permissions to view the files attached to this post.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Using C# class library from PHP

Postby ginnisingh » April 16th, 2013, 9:16 am

Hi,

I have a PHP API with me which has different methods in it. I need to use that API from my C# code. Functions which are defined in api are login, add user, delete used, user details etc.

I installed phalanger and configured it on my VS 2010.

How Phalanger helpful in that and how can i access them using Phalanger.

Thanks.
ginnisingh
 
Posts: 1
Joined: April 16th, 2013, 9:06 am

Re: Using C# class library from PHP

Postby Dewey » July 9th, 2013, 11:49 pm

Would this work the same way if the class library was placed in the bin directory of a web app and used in php code?
Dewey
 
Posts: 6
Joined: July 9th, 2013, 11:34 pm

Re: Using C# class library from PHP

Postby Jakub Misek » July 10th, 2013, 11:54 am

Dewey wrote:Would this work the same way if the class library was placed in the bin directory of a web app and used in php code?
It would, please let us know how does it work in your case.
Thanks
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to PHP/C# interoperability

Who is online

Users browsing this forum: No registered users and 2 guests

cron

User Control Panel

Login

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 151 on December 6th, 2020, 7:46 am

Users browsing this forum: No registered users and 2 guests