Developing PHP Module
1, first enter the PHP source code directory in the EXT directory, execute the following command:
#./ext_skel--extname= Custom Module name
After execution, a folder named "Custom module name" is generated, and the Config.m4 file is edited after entering this folder.
Find the following code:
DNL php_arg_with (test, for test support,
DNL Make sure, the comment is aligned:
DNL [--with-test Include Test Support]
DNL php_arg_enable (test, whether to ENABLE test support,
DNL Make sure, the comment is aligned:
DNL [--enable-test enable Test support])
Remove the DNL in front of each line
2. Write The Calling function (refer to the article written by three previous modules)
3. Compiling:
Using the traditional method of compiling PHP modules:
Phpize
./configure
Make
Make install
4, then the module extension in, ok! You can use your own module! These are the most basic operations, the next look at their C language skills!