1. First use ext_skel to create a PHP extended module skeleton:
What should be noted here is that the ext_skel tool is generally in the ext directory of the PHP source code package, but I prefer to put it out, that is, not to create a module in the ext directory of the PHP source code package. Suppose I now create a module in /home/php The module named php_hello
#cd /home/php
#/path/to/ext_skel --extname=php_hello
#cd php_hello
Modify the config.m4 file as follows: Simply remove some dnl comments:
PHP_ARG_WITH(php_hello, for php_hello support,
dnl Make sure that the comment is aligned:
[ --with-php_hello Include php_hello support])
or
PHP_ARG_WITH(php_hello, for php_hello support,
dnl Make sure that the comment is aligned:
[ --with-php_hello Include php_hello support])
This completes the skeleton of an extended module. Take a look at the end of config.m4: PHP_NEW_EXTENSION(php_hello, php_hello.c, $ext_shared) This line specifies the target file that the php_hello module needs to compile, which is php_hello.c
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn