一、使用ext_skel工具生成扩展框架 php
./ext_skel --extname=myextvim
二、编辑config.m4文件框架
cd myext/
vim config.m4工具
去掉如下内容的注释:it
PHP_ARG_ENABLE(changchunbo_test, whether to enable changchunbo_test support,
[ --enable-changchunbo_test Enable changchunbo_test support])编译
三、php化并配置
phpize5
./configure --with-php-config=/usr/bin/php-config5test
四、编译安装扩展
make
make test
sudo make install配置
五、查看扩展gc
cd /usr/lib/php5/20121212/