简体   繁体   中英

php c++ communication

您好,我是php的新手,我用c ++编写了整个代码,并想在php.so中使用此代码。因此我将dll转换为我的代码以使用它。但是我无法在php中使用此dll,有人可以发送给我使用php,c ++扩展的完整代码。

There's a whole section about some php internals and how to write/build a php extension in the online manual at http://php.net/internals2 , and I especially want to point out the description of the ext_skel script there as it helps you to set up a new "empty" extension project.
And there are alos tools like SWIG that help you to wrap existing libraries into extensions for numerous languages including PHP.

I made a PHP extension in C++ using SWIG . The PHP specific documentation can be found here .

Since very few online documentation is avaible on using the Zend API I also recommend the book Extending and Embedding PHP .

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