您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP模块编写

2026/1/26 10:35:34发布7次查看
开发php module
1、首先进入php源代码目录中的ext目录,执行如下命令:
# ./ext_skel --extname=自定义模块名
执行完成后,会生成以“自定义模块名”命名的文件夹,进入这个文件夹后编辑config.m4文件
找到如下代码:
dnl php_arg_with(test, for test support,    
dnl make sure that the comment is aligned:    
dnl [    --with-test                         include test support])
dnl php_arg_enable(test, whether to enable test support,    
dnl make sure that the comment is aligned:    
dnl [    --enable-test                     enable test support])
去掉每行前面的dnl
2、编写调用函数(参考之前三篇模块编写的文章)
3、编译:
使用传统的php模块编译方法:
phpize
./configure
make
make install
4、然后把模块extension进来,ok!可以使用自己的模块啦!这些是最基本的操作,接下来就看自己的c语言功底啦!
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product