我发现了一个很好的啧啧:http://www.hackingwithphp.com/20/3/0/first-step
sudo -s ENTER
./ext_skel --extame=hello
我修改了文件:
PHP_ARG_ENABLE(hello, whether to enable hello support,
dnl Make sure that the comment is aligned:
[ --enable-hello Enable hello support])
./buildconf --force ENTER
./configure --enable-debug --enable-maintainer-zts --with-apxs2 --disable-cgi --enable-cli --without-pear --disable-xml --without-mysql --enable-hello ENTER
make ENTER
make install ENTER
我的电脑:
root@DELL:~/Downloads/php-5.5.38# php -f ext/hello/hello.php
Functions available in the test extension:
confirm_hello_compiled
Speicherzugriffsfehler (Speicherabzug geschrieben)
root@DELL:~/Downloads/php-5.5.38#
根据教程,它应该如下所示:
debian php-5.0.1$ php -f ext/hello/hello.php
Functions available in the test extension:<br>
confirm_hello_compiled<br>
<br>
Congratulations! You have successfully modified ext/hello/config.m4.
Module hello is now compiled into PHP.