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

相关文章:

  • 2021-09-25
  • 2022-01-11
  • 2021-12-06
  • 2021-10-22
  • 2021-11-16
  • 2021-04-09
  • 2022-12-23
猜你喜欢
  • 2022-01-15
  • 2021-06-27
  • 2021-08-14
  • 2021-09-12
  • 2021-11-10
  • 2021-08-03
  • 2021-07-30
相关资源
相似解决方案