PHP extension Development (1)-Creating the underlying framework

Source: Internet
Author: User

Build the basic framework for PHP extension development. First, under Linux

$>CD ~/{php Source Code}/ext

$>./ext_skel--extname=simple Creating Directory Simple
Creating basic files:config.m4 config.w32. Svnignore simple.c php_simple.h CREDITS experimental TESTS/001.PHPT simple.ph p [done].

To use your new extension and you'll have to execute the following steps:

1. $ CD.
2. $ VI EXT/SIMPLE/CONFIG.M4
3. $./buildconf
4. $./configure--[with|enable]-simple
5. $ make
6. $./php-f ext/simple/simple.php
7. $ VI ext/simple/simple.c
8. $ make

Repeat steps 3-6 until you is satisfied with EXT/SIMPLE/CONFIG.M4 and
Step 6 confirms that your module is compiled into PHP. Then, start writing
Code and repeat the last steps as often as necessary. Second, under Windows $>CD ~/{php source}/ext$>php.exe ext_skel_win32.php--extname=simple Creating directory Simple
Creating basic files:config.m4 config.w32. Svnignore simple.c php_simple.h CREDITS experimental TESTS/001.PHPT simple.ph p [done].

To use your new extension and you'll have to execute the following steps:

1. $ CD.
2. $ VI EXT/SIMPLE/CONFIG.M4
3. $./buildconf
4. $./configure--[with|enable]-simple
5. $ make
6. $./sapi/cli/php-f ext/simple/simple.php
7. $ VI ext/simple/simple.c
8. $ make

Repeat steps 3-6 until you is satisfied with EXT/SIMPLE/CONFIG.M4 and
Step 6 confirms that your module is compiled into PHP. Then, start writing
Code and repeat the last steps as often as necessary.

PHP extension Development (1)-Creating the underlying framework

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.