問題描述
我們網站的一部分是用 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.
這篇關于PHP 和 ASP.Net 可以在 IIS 7.5 中的同一個網站中一起運行嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!