Jexus以.NET(Phalanger)方式支援PHP的網站

來源:互聯網
上載者:User

Jexus可以同時用普通方式(PHP-CGI/PHP-FPM)以及.NET(Phalanger)方式支援PHP,為了不引起混淆,用.NET方式支援PHP時,要注意如下事項:
1、網站設定檔中的UsePHP的值為false,或者不用這一句。
2、網站設定檔中添加一行 ASPNET_Exts=php,說明php網頁按ASP.NET處理,如果已經有這一項,就在末尾添一個php(用英檔案逗號與已有副檔名分隔)。
3、Jexus啟用.NET4工作模式(在jws.conf中添一行“Runtime=v4.0.30319”)。
4、在網站的web.config添加Phalanger有關配置。

在“<configuration>”下添加:
  <configSections>
    <section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
  </configSections>

  <phpNet>
    <compiler>
      <!-- <set name="Debug" value="true" /> -->
    </compiler>
    <paths>
      <set name="DynamicWrappers" value="/tmp" />
      <set name="Libraries" value="Bin" />
    </paths>
    <classLibrary>
      <add assembly="PhpNetClassLibrary, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl" />
    </classLibrary>
  </phpNet>

在"system.web"中添加:
<httpHandlers>
  <add path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
</httpHandlers>

具體的配置執行個體參照 MVC3+RAZOR+PHP.NET 網站基礎包

使用Phalanger整合PHP和.NET

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.