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
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
解决方案 »
- PHP数组按照概率返回的算法
- NetBeans 开发php时,对于网页有没有类似dreamweaver那样的设计视图
- 欢迎各位phper朋友加入P友会,QQ群号是:103929214
- 求解,数组的合并,谢谢各位了
- 终于能运行hello world程序了!!
- 初学PHP 想问各位高手 PHP可以实现局域网内的机器间的下载吗?紧急求助
- linuxRedhat8上,如何让apache支持.php3的文件?
- 求教, 各位高手 帮忙 。。 高分相送。。
- 将记录直接用delete删除那么BLOB或CLOB的数据会跟着被删除吗?
- 谁能举一个一对多 多对多的例子
- 关于apache 的问题
- php支持access数据库吗?
% 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.
不过,我觉得没什么特别的东西值得写!大家讨论以下!
人气非常差,想个办法吧!