linux環境下編譯php擴展

一、使用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/

相關文章
相關標籤/搜索