Page 1 of 1

Integrate PHP web pages in a .NET website

PostPosted: February 25th, 2013, 1:45 pm
by zimo84
Hello,

Does someone know if it is possible to integrate PHP pages in a .NET website?
My purpose is to have a .NET website, with HTML and CSS, developed in C#, with some pages developed in PHP which interact whithin the website?

I have installed the PHP tools for Visual Studio.

Thank you in advance.

Bye

Simo

Re: Integrate PHP web pages in a .NET website

PostPosted: February 25th, 2013, 2:29 pm
by Jakub Misek
Hi,

There are two ways of integrating .NET and PHP.

Simple one, you can just have .php files and .aspx files within one project. PHP Tools supports this kind of interoperability, and you are free to use ASP.NET web site project containing both asp files and php files. However you won't be able to take advantage of debugging features. For this option, just configure your web.config to handle .php files with your local php-cgi.exe.

There is a second option of tight PHP and .NET integration. If you require to make calls between these two languages (like use .NET libraries in PHP and vice versa), you may check Phalanger (http://phalanger.codeplex.com) - it replaces PHP with .NET compiler. So you will be actually using PHP language to create .NET programs, with all the benefits like C# has. Phalanger also comes with Visual Studio integration so you'll have all the PHP editor features too.

Thanks,