开发者

Return PHP page from ASP route handler

I would like to return a PHP page from a route handler like so:

return BuildManager.CreateInsta开发者_如何学PythonnceFromVirtualPath("/redirects.php", typeof(Page)) as Page;

This requires an extra buildProvider and returns a page with PHP directives unprocessed, so I can view all the PHP code with View Source. How can I tell it to process the code rather than just output the page?


It's unusual to want ASP.NET and PHP on the same server. The answer is that you need to install the PHP interpreter on your server.

I presume you're using using IIS. This seems like a good place to start: http://php.iis.net/


You would have to call it as a URL. Using CURL or something. I'm not sure what the C# equivalent is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜