PHP Module Authoring

Source: Internet
Author: User
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!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.