Open skey opened 11 years ago
sudo apt-get install php5-dev
sudo apt-get source php5
cd /php5-5.4.6/ext
./ext_skel --extname=skey (扩展名称)
Creating directory skey
Creating basic files: config.m4 config.w32 .svnignore skey.c php_skey.h CREDITS EXPERIMENTAL tests/001.phpt skey.php [done].
To use your new extension, you will have to execute the following steps:
1. $ cd ..
2. $ vi ext/skey/config.m4
3. $ ./buildconf
4. $ ./configure --[with|enable]-skey
5. $ make
6. $ ./php -f ext/skey/skey.php
7. $ vi ext/skey/skey.c
8. $ make
dnl PHP_ARG_WITH(skey, for skey support,
dnl Make sure that the comment is aligned:
dnl [ --with-skey Include skey support])
修改为
PHP_ARG_WITH(skey, for skey support,
Make sure that the comment is aligned:
[ --with-skey Include skey support])
phpize
./configure
make
make install
php.ini 增加 extension=skey.so
<?php
echo confirm_skey_compiled("skey");
?>
加载成功后会输出
Congratulations! You have successfully modified ext/skey/config.m4. Module skey is now compiled into PHP
如题