Creating a standalone skeleton extension
First, make sure you have the most recent versions of bison, flex, autoconf, automake, and libtool installed. Along with gcc, and make, of course. It is also a good idea to build and install the command line version of PHP before you continue. It is much easier to debug a single standalone php binary than the module version embedded in Apache. % cd php4/ext 
% ./ext_skel --extname=foo 
Creating directory foo 
Creating basic files: config.m4 Makefile.in .cvsignore foo.c  
                      php_foo.h CREDITS EXPERIMENTAL  
                      tests/001.phpt foo.php [done]. 
% cd foo 
% ls 
config.m4    CREDITS       EXPERIMENTAL    foo.c  
foo.php      Makefile.in   php_foo.h       tests/ 
% phpize 
% ls 
acinclude.m4   config.guess*  config.sub*    CREDITS         
foo.c          ltmain.sh*     mkinstalldirs  aclocal.m4 
config.h.in    configure*     dynlib.m4      foo.php 
Makefile.in    php_foo.h      build/         config.m4 
configure.in   EXPERIMENTAL   install-sh     missing 
tests/ 
% cd .. 
% mv foo /tmp 
% cd /tmp/foo 

解决方案 »

  1.   

    Compiling the test skeleton extension% cd /tmp/foo 
    % vi config.m4 The config.m4 file
    The config.m4 file adds any extension-specific configuration options. If your extension relies on external libraries and header files, you need to define those in this file and uncomment the --with-foo section. If your extension does not rely on any external libraries, uncomment the --enable-foo section. configure, build and install% ./configure 
    % make 
    % cp modules/foo.so /usr/local/lib/php 
    Testing your extension
    The ext_skel script created a sample foo.php script. A quick way to check if your extension is working is to edit this script and add dl('foo.so') to the top. Then run it through your command-line PHP parser: % php -q foo.php 
    Congratulations!  
    You have successfully modified ext/foo/config.m4.  
    Module foo is now compiled into PHP. 
      

  2.   

    zend有一些规范 :http://www.zend.com/apidoc/
    不过,我觉得没什么特别的东西值得写!大家讨论以下!
      

  3.   

    for win的我可以给些建议!我不会linux下的gcc,哎!麻烦!
      

  4.   

    yorgo(羽高)
    人气非常差,想个办法吧!
      

  5.   

    to yorgo 看看我的问题行吗?我急着用,关于oracle显示中文的问题