[PHP]:是否有可能通过PHP访问.NET的DLL? [英] [PHP]: Is it possible to access .NET DLL through PHP?

查看:168
本文介绍了[PHP]:是否有可能通过PHP访问.NET的DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含我可以在PHP中使用函数一个.NET的DLL。虽然各种PHP库都可以,但我只是想知道PHP是否支持其他语言编写的图书馆?在未来,如果我写的Ruby库,并希望使用它与PHP,这可能吗?

I have a .NET DLL containing functions that I can use in PHP. Though various PHP libraries are available, but I just wanted to know whether PHP supports libraries written in other languages? In future if I write a library in Ruby and want to use it with PHP, is it possible?

推荐答案

这是可能的,虽然我从来没有做过个人:

It is possible though I've never done it personally:

看看这个东西: http://us.php.net/manual /en/class.dotnet.php

更新:给你的需要是一台Linux服务器我倒是觉得你有更少的选择上。你可以换的DLL在.NET Web服务,只露出你需要的对象/方法/属性,并使用运行Web服务的。然后,你可以访问该DLL的东西,你会任何Web服务。

Update: given your need to be on a linux server I'd think you have fewer options. You could wrap the dll in a .net webservice, only expose the objects/methods/properties you need, and run the webservice using Mono. Then you could access the dll "stuff" as you would any web service.

也可以跨了该项目。这可能是你的潜在方法。

Also ran across this project - PHP4Mono. This may be a potential approach for you.

这篇关于[PHP]:是否有可能通过PHP访问.NET的DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆