如何将PHP脚本添加到C#代码 [英] How to add PHP Script to C# code
问题描述
大家好.
我正在Microsoft C#中开发一个软件(与WEB SERVER相同),我必须使用C#程序运行PHP代码,并在硬盘上安装PHP文件: php代码将包含在C#项目中,是否有任何方法可以实现.
我尝试过:
下载适用于Windows的PHP,并将PHP代码的文件名传递给php-win.exe,然后放到我的C#程序中,但是为此,我需要将PHP文件放在硬盘上,这对我的应用程序不利,我不希望表明我在应用程序中使用PHP.
是否有任何PHP库,以便我可以在C#代码本身中包含php文件并运行php脚本.请让我知道.
我看到这可能是C ++和python的可能.有一个库pylib左右.php也需要相同的库.即使是c ++和php也适合我.
问候,
Pavan.
Hi EveryOne.
I am developing an software (Same Like WEB SERVER ) in Microsoft C# and i have to run PHP code with C# program with have PHP file on hard disk i:e; php code will be include in C# project,is there any way to do this.
I tried this:
Downloaded PHP for Windows and passed file name of PHP code to php-win.exe and got out put to my C# program.But for this I need to have PHP file to be on hard disk.Which is not good for my Application and I dont like to show that i am using PHP in my application.
Is there any library for PHP so that I can include php file in C# code itself and run php script.Please Let Me know.
I seen this is possible with c++ and python.there is a library pylib or so.I need same for php. even c++ and php is also ok for me.
Regards,
Pavan.
推荐答案
http://tomasp.net /blog/ducktyping-in-phalaner.aspx [ ^ ]
检查此链接
http://tomasp.net/blog/ducktyping-in-phalaner.aspx[^]
check this link
www.php-compiler.net,这可以帮助您正确阅读文章,对我有很大帮助.
恶作剧
www.php-compiler.net, thsi could help you out read the articles properly, it helped me a lot.
thnaks
这篇关于如何将PHP脚本添加到C#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!