PHP 和 ASP.Net 可以在 IIS 7.5 中的同一个网站中一起运行吗?
我们网站的一部分是用 PHP 完成的,我们网站的一部分是用 ASP.Net 完成的.我们刚刚使用安装了 IIS 7.5 的 Windows Server 2008 R2 设置了一个新的 Web 服务器.
A portion of our site is done in PHP and a portion of our site is done in ASP.Net. We just set up a new web server with Windows Server 2008 R2 which has IIS 7.5 installed.
我知道 IIS 7+ 支持 PHP,但是 PHP 和 ASP.Net 可以在 IIS 中的单个网站中并行运行,或者我必须为 PHP 页面设置一个网站和一个网站吗?ASP.Net 页面的站点?
I understand that IIS 7+ supports PHP, but can PHP and ASP.Net run side-by-side within a single web site in IIS, or would I have to set up one web site for the PHP pages and one web site for the ASP.Net pages?
推荐答案
您应该能够在同一个站点中运行两者,但请确保该站点的 AppPool 运行经典"ASP.NET 池配置.默认的 AppPool 通过 ASP.NET 路由所有内容,而您的 PHP 页面不希望这样.
You should be able to run both in the same site, but be sure that the AppPool for the site runs a "classic" ASP.NET pool configuration. The default AppPool routes everything through ASP.NET, and you won't want that for your PHP pages.
除此之外,你应该没事.查询字符串、文件和后端数据库将是在页面之间共享数据的最佳方式.
Other than that, you should be fine. Query strings, files, and back-end databases will be the best way to share data between pages.
相关文章