Can PHP and ASP.Net run together within the same web site in IIS 7.5?

后端 未结 8 1600
梦谈多话
梦谈多话 2020-11-28 12:28

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.

8条回答
  •  时光说笑
    2020-11-28 13:05

    You can run both on the same site, but won't be able to talk to each other unless you setup some sort of messaging system or share storage.They are basically applications of complete different nature.

    Another possibility is to call your .NET code from PHP:

    A piece of code written in C# like this:

    string javascript = "";
    Microsoft.Ajax.Utilities.Minifier m = new Microsoft.Ajax.Utilities.Minifier();
    Microsoft.Ajax.Utilities.CodeSettings settings = new Microsoft.Ajax.Utilities.CodeSettings();
    settings.OutputMode = Microsoft.Ajax.Utilities.OutputMode.SingleLine;
    settings.PreserveFunctionNames = false;
    string minified = m.MinifyJavaScript(javascript, settings);
    

    Will look like this on PHP:

    $minifier = netMinifier::Minifier_Constructor();
    $settings = netCodeSettings::CodeSettings_Constructor();
    $csssettings = \ms\Microsoft\Ajax\Utilities\netCssSettings::CssSettings_Constructor();
    $settings->OutputMode(\ms\Microsoft\Ajax\Utilities\netOutputMode::SingleLine());
    $settings->PreserveFunctionNames(FALSE);
    $settings->QuoteObjectLiteralProperties(TRUE);
    $result = $minifier->MinifyStyleSheet($css, $csssettings, $settings)->Val();
    

    From:

    http://www.drupalonwindows.com/en/blog/calling-net-framework-and-net-assemblies-php

提交回复
热议问题