tags:

views:

122

answers:

3

Is it possible with IIS to serve a .php page, but that can also host asp.net control?

Like a two-pass parsing, the first pass parse the php, then the asp.net parser transform the controls.

The variable declared on each layer do not need to be shared.

Is it possible or is it a sin?

A: 

Ultra hack and untested... but maybe....

Use output buffering and have a PHP script that generates your control. Then, save the output to a file (with a unique name) and file_get_contents() to evaluate the ASPX file.

MathGladiator
This would be a sin because you have disc access in between every request. Who knows what kind of strange overhead and problems that might lead to (or am I exaggerating?)
Yar
We dropped the idea, but I will accept this answer.
Pierre-Alain Vigeant
It is an ultra sin.
MathGladiator
A: 

Regardless of whether or not ZenGeneral's creative hack works, its a sin and really, just don't go there!

Alex
Why? What's bad about it?
Yar
http://stackoverflow.com/questions/1480389/parse-php-then-parse-asp-net/1480468#1480468
Alex
A: 

Possible, but not recommended. Pick one or the other. In worse case scenario, you could use a php curl to grab the aspx or even (GRASP!) an iframe. It puts a lot of unnecessary strain on the server, because it has to get the php file, parse it, then get the aspx file, parse it, then send it to php (or php grabs it), then renders the rest of the php file once the request goes through. It also would make the load times slower.

CodeJoust