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...