Page 1 of 1

Use Classes and Sessions from PHP code / files in ASP.Net

PostPosted: December 14th, 2012, 1:14 am
by compucoder
I have my PHP application running 100% under Phalanger and now want to start extending it with C# and .aspx pages.

I figured out how to access the Session variables in .aspx pages just by using the Session[] array. This is simple when the content is a basic type. I cannot figure out how to get at the properties and methods if the session var is an object. Can someone provide an example on how to do this?

Also, is there a way to use the PHP classes from the PHP files in aspx pages? Basically, instantiate a C# object for a Class defined in a .php page.

Our goal is to slowly migrate our native PHP products over to C#/ASP.Net and would like to use Phalanger to help with this. The 2 issues above will solve most of our difficulties.

Thanks.

Re: Use Classes and Sessions from PHP code / files in ASP.Ne

PostPosted: December 14th, 2012, 4:02 pm
by Jakub Misek
Yes, this is all possible very easily.

Methods of PHP objects can be called using 'dynamic' keyword (.NET 4.0). Instantiating PHP classes too.

See http://www.php-compiler.net/blog/2012/n ... langer-3-0 for details.

Thanks