Warning: file_get_contents() expects exactly 1 parameter, 5 given in /www/wwwroot/www.zc91.cn/wp-includes/functions.php on line 6620

Warning: file_get_contents() expects exactly 1 parameter, 5 given in /www/wwwroot/www.zc91.cn/wp-includes/functions.php on line 6620
如何安装 PHP-CPP - 紫竹林-程序员中文网-紫竹林-程序员中文网

如何安装 PHP-CPP

php原生扩展开发,采用C语言开发,混合大量Zend函数,开发扩展需要额外学习Zend,所以推荐大家使用PHP-CPP开发PHP扩展。

PHPCPP安装

下载地址:https://github.com/CopernicaMarketingSoftware/PHP-CPP

编译并安装

下载后上传服务器进入目录然后编译并安装PHPCPP

make &&sudo make install

如果报错

mkdir -p shared/common
mkdir -p shared/zend
g++ -Wall -c -std=c++11 -fvisibility=hidden -DBUILDING_PHPCPP -Wno-write-strings -MD -g `php-config --includes` -fpic -o shared/common/modifiers.o common/modifiers.cpp
/bin/sh: php-config: command not found
common/modifiers.cpp:13:10: fatal error: php.h: No such file or directory
 #include <php.h>
          ^~~~~~~
compilation terminated.
make: *** [Makefile:213: shared/common/modifiers.o] Error 1

解决方法

[root@192 PHP-CPP-php7]# rm -rf /usr/bin/php-config
[root@192 PHP-CPP-php7]# ln -s /www/server/php/74/bin/php-config /usr/bin
未经允许不得转载:紫竹林-程序员中文网 » 如何安装 PHP-CPP
关于我们 免责申明 意见反馈 隐私政策
程序员中文网:公益在线网站,帮助学习者快速成长!
关注微信

微信扫码
关注微信

技术交流群
管理员微信号
每天精选资源文章推送
管理员QQ
随时随地碎片化学习
管理员抖音号
发现有趣的