Do you know how can I call an ASP.NET .dll file from a PHP script?
Thanks!
你知道如何从PHP脚本调用ASP.NET .dll文件吗?谢谢!
1 个解决方案
#1
4
You use the DOTNET extension.
您使用DOTNET扩展。
First off, you need to be running this on Windows. If you are on linux, then I would look at using something like Facebooks Thrift.
首先,您需要在Windows上运行它。如果你在Linux上,那么我会看看像Facebooks Thrift这样的东西。
If you are on windows and depending on which build of windows you are using you may need to uncomment the com extension in your php.ini
如果你在Windows上,根据你正在使用的windows版本,你可能需要在php.ini中取消注释com扩展名
<?php
$stack = new DOTNET("mscorlib", "System.Collections.Stack");
$stack->Push(".Net");
$stack->Push("Hello ");
echo $stack->Pop() . $stack->Pop();
?>
Here are a list of Windows Specific functions
以下是Windows特定功能的列表
#1
4
You use the DOTNET extension.
您使用DOTNET扩展。
First off, you need to be running this on Windows. If you are on linux, then I would look at using something like Facebooks Thrift.
首先,您需要在Windows上运行它。如果你在Linux上,那么我会看看像Facebooks Thrift这样的东西。
If you are on windows and depending on which build of windows you are using you may need to uncomment the com extension in your php.ini
如果你在Windows上,根据你正在使用的windows版本,你可能需要在php.ini中取消注释com扩展名
<?php
$stack = new DOTNET("mscorlib", "System.Collections.Stack");
$stack->Push(".Net");
$stack->Push("Hello ");
echo $stack->Pop() . $stack->Pop();
?>
Here are a list of Windows Specific functions
以下是Windows特定功能的列表