安装好php,进入安装目录.

zbseoag@ubuntu:/usr/local/php-5.6.28/ext$ ./ext_skel --extname=mytest
zbseoag@ubuntu:/usr/local/php-5.6.28/ext$ cd mytest
zbseoag@ubuntu:/usr/local/php-5.6.28/ext/mytest$ gedit config.m4
 
###编辑文件(16 - 18行)
PHP_ARG_ENABLE(mytest, whether to enable mytest support,
dnl Make sure that the comment is aligned:
[  --enable-mytest           Enable mytest support])
 
zbseoag@ubuntu:/usr/local/php-5.6.28/ext/mytest$ ../../scripts/phpize
zbseoag@ubuntu:/usr/local/php-5.6.28/ext/mytest$ sudo apt-get install autoconf
zbseoag@ubuntu:/usr/local/php-5.6.28/ext/mytest$ make
zbseoag@ubuntu:/usr/local/php-5.6.28/ext/mytest$ sudo make install
zbseoag@ubuntu:/usr/local/php-5.6.28/ext/mytest$ php -i | grep php.ini
 
###在ini文件中添加扩展: extension=mytest.so

 
zbseoag@ubuntu:/usr/local/php-5.6.28/ext/mytest$ php -r 'echo confirm_mytest_compiled("\nHello World!")."\n";'
Congratulations! You have successfully modified ext/mytest/config.m4. Module 
Hello World! is now compiled into PHP.

最新文章

  1. 软件工程的引入:Scrum开发框架总结
  2. Linux文件系统扩容步骤
  3. day26_网络编程第一天
  4. MFC Initinstance中DoModal()返回-1
  5. 前台 JSON对象转换成字符串 相互转换 的几种方式
  6. 二分+贪心 hihocoder 1249 Xiongnu's Land (15北京A)
  7. 在Tomcat里使用配置连接池连接数据库
  8. HDU----(4549)M斐波那契数列(小费马引理+快速矩阵幂)
  9. Type-base dispatch
  10. 使用TypeDescriptor给类动态添加Attribute
  11. PAT1028—— 人口普查
  12. hdu1285+hdu2467(拓扑排序)
  13. 2017-06-30(ps pstree top kill w killall pkill)
  14. 【ESP8266】、ESP8266通讯使用的AT指令
  15. C语言实现字符串IP与整数型IP的相互转换
  16. pbs 作业管理命令
  17. 游戏:贪吃虫(GreedyMaggot)
  18. 479. Largest Palindrome Product
  19. hdu 5443 The Water Problem(长春网络赛——暴力)
  20. ie6 浏览器的bug

热门文章

  1. GDB中应该知道的几个调试方法 来自陈皓
  2. win7 电脑能上网,但是下面的图标显示红叉的解决方法
  3. 构建seajs业务模块之grunt VS spm build
  4. codevs1080线段树练习
  5. Matlab数值计算最简单的一个例子——指数衰减
  6. POJ 3041 Asteroids
  7. PHP error_log() 函数
  8. Python 常用函数大体分类
  9. 敲点JavaScript代码
  10. js打印(控件)及多种方式