Use Classes and Sessions from PHP code / files in ASP.Net
2 posts
• Page 1 of 1
Use Classes and Sessions from PHP code / files in ASP.Net
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.
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.
- compucoder
- Posts: 12
- Joined: August 16th, 2012, 12:29 pm
Re: Use Classes and Sessions from PHP code / files in ASP.Ne
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
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
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
2 posts
• Page 1 of 1
Return to PHP/ASP.NET Web Applications
Who is online
Users browsing this forum: No registered users and 3 guests