C代码和PHP [英] C Code and PHP

查看:61
本文介绍了C代码和PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在javascript论坛上询问了

一步一步的说明如何编写一个代码来实现

使用一些简单的C函数并在服务器中显示它。


请看以下链接


http://bytes.com/topic/javascript/answers/876590-how-do-i -write-code-javascript-use-function-c

我有视觉C ++ 2008和微软视觉工作室2008

我希望你能帮助我给我一步一步的说明如何编写代码,简单地说明如何编写与我的javascript代码相同的代码,这意味着通过调用我所拥有的简单C函数在服务器中显示plus1(5)的结果。 br />

在此先感谢,

Uri

I already asked in the javascript forum
step by step instructions how to write a code that is going to
use some simple C function and show it in the server.

see the following link

http://bytes.com/topic/javascript/answers/876590-how-do-i-write-code-javascript-use-function-c

I have visual C++ 2008 and microsoft visual studio 2008
I hope that you can help me to give me step by step instructions how to write code that simply show how to write code that does the same as my javascript code does that mean showing the result of plus1(5) in the server by calling the simple C function that I have.

Thanks in advance,
Uri

推荐答案

您可能想尝试 SWIG


你也可以做一个< a rel =nofollowhref =http://en.wikipedia.org/wiki/PHP_Extension _Community_Librarytarget =_ blank> PECL 扩展。


如果C函数很简单,最好用PHP编写(所以你不要这样做有接口开销)
you may want to try SWIG.

you can also make a PECL extension.

and if the C function is simple, it?s better to write it in PHP (so you don?t have the interface overhead)


SWIG文章(未发布)


或者如果您想自己编写PHP扩展(这不是那么难),请参阅< a rel =nofollowhref =http://wiki.php.net/internals/windows/stepbystepbuildtarget =_ blank>此链接关于Windows上PHP的扩展开发。


Mark。
SWIG article (not published).

Or if you want to write the PHP extension yourself (it''s not so hard), see this link on extension development for PHP on Windows.

Mark.


是的......你可以使用SWIG ...它易于使用。


正如MARK所说,你也可以创建自己的PHP扩展......两者都可以达到你的目的。


问候

Dheeraj Joshi
Yeah... You can use SWIG... Its easy to use.

As MARK told you can create your own PHP extensions also... Both will serve your purpose.

Regards
Dheeraj Joshi


这篇关于C代码和PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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