php扩展开发笔记1
Posted mycnblogs
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php扩展开发笔记1相关的知识,希望对你有一定的参考价值。
85 yum install wget -y
86 cd /usr/local/src/
87 wget http://php.net/distributions/php-5.6.19.tar.bz2
88 tar jxf php-5.6.19.tar.bz2
91 cd php-5.6.19/ext/
94 ./ext_skel
95 ./ext_skel --extname=imsjobs
[[email protected] ext]# ./ext_skel --extname=imsjobs Creating directory imsjobs Creating basic files: config.m4 config.w32 .gitignore imsjobs.c php_imsjobs.h CREDITS EXPERIMENTAL tests/001.phpt imsjobs.php [done]. To use your new extension, you will have to execute the following steps: 1. $ cd .. 2. $ vi ext/imsjobs/config.m4 3. $ ./buildconf 4. $ ./configure --[with|enable]-imsjobs 5. $ make 6. $ ./sapi/cli/php -f ext/imsjobs/imsjobs.php 7. $ vi ext/imsjobs/imsjobs.c 8. $ make Repeat steps 3-6 until you are satisfied with ext/imsjobs/config.m4 and step 6 confirms that your module is compiled into PHP. Then, start writing code and repeat the last two steps as often as necessary.
96 cd ..
97 vim ext/imsjobs/config.m4
只需要去掉这3行的注释:
PHP_ARG_WITH(imsjobs, for imsjobs support, Make sure that the comment is aligned: [ --with-imsjobs Include imsjobs support])
98 ./buildconf
99 ./buildconf --force
100 yum install autoconf
101 ./buildconf --force
102 vim ext/imsjobs/php_imsjobs.h
103 ./buildconf --force
104 ./configure
105 yum install gcc
106 ./configure
107 ./configure --with-imsjobs
108 yum install libxml2-devel
109 ./configure --with-imsjobs
110 make
111 ./sapi/cli/php -f ext/imsjobs/imsjobs.php
112 vi ext/imsjobs/imsjobs.c
113 vim ext/imsjobs/imsjobs.c
未完待续
以上是关于php扩展开发笔记1的主要内容,如果未能解决你的问题,请参考以下文章
markdown 链接,片段,提醒,收集点作为重新访问WordPress插件开发期间的笔记#WordPress #Plugin #PHP #Refere