PHP extension development (1)-create a basic framework, php framework _ PHP Tutorial

Source: Internet
Author: User
PHP extension development (1)-create a basic framework and a php framework. PHP extension development (1)-create a basic framework and generate a basic framework for php extension development. I. $ cd ~ in Linux ~ {Php source code} ext $. ext_skel -- extnamesimpleCreatingdirectorysim PHP extension development (1)-create a basic framework and a php Framework

Generate the basic framework for PHP extension development. I. in 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. php [done].

To use your new extension, you will 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. php
7. $ vi ext/simple. c
8. $ make

Repeat steps 3-6 until you are 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 two steps as often as necessary. 2. Windows $> cd ~ /{Php source code}/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. php [done].

To use your new extension, you will 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. php
7. $ vi ext/simple. c
8. $ make

Repeat steps 3-6 until you are 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 two steps as often as necessary.

Example (1)-create a basic framework. The php framework generates a basic framework for PHP extension development. I. $ cd ~ in Linux ~ /{Php source code}/ext $./ext_skel -- extname = simpleCreating directory sim...

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.