简体   繁体   中英

Integrate ASP.NET (C#) into PHP

是否可以通过php调用C#方法和asp.net页面?

Within a PHP generated page you can definitely link to a ASP.NET page.

If you want to call a C# method within a PHP script, I would suggest you using a RESTful API or SOAP to invoke C#'s method remotely. Your ASP.NET application server will host the WebService, and your PHP script will be the client.

I'm not exactly sure what your scenario is, but you may check out Phalanger .

Phalanger is an open-source compiler of PHP to .NET which also adds some extensions to PHP that make it possible to call .NET methods (and similarly, you can call compiled PHP from C#).

I'm not sure exactly what you mean, however it is possible to call page methods which have to be called via POST with content-type = "application/json; charset=utf-8". There are jQuery tactics to do this from a web page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM