1、下载php源码包

2、在php-7.0.9/ext 下执行 ./ext_skel --extname=hello 

3、

4、拓展代码

5、

6、编译

多了分号,出错。

重新编译成功,但是生成的文件(.so)没有移动到php拓展目录下。还需手动移动。

上图可以看到 modules 目录下生成的hello.so文件。

使用 php -info | more 查看php配置信息,可看到拓展路径。

配置php.ini,加上extensions = hello.so

最后,使用hello()

来源:http://www.bo56.com/php7%E6%89%A9%E5%B1%95%E5%BC%80%E5%8F%91%E4%B9%8Bhello-word/

php的启动与终止

最新文章

  1. 为什么需要Bundler
  2. RadioButtonList单选和RequiredFieldValidator验证是否选中
  3. 【CCS仿真】如何将CCS仿真时memory中的数据以Hex、Integer、 Long 、Float、 Addressable Unit类型保存到PC
  4. openstack学习线路指导
  5. java计算一个月有多少天和多少周
  6. Android 监听wifi广播的两种方式
  7. 使用PHP从web访问mysql数据库
  8. c++中参数传递和函数返回简析
  9. 201521123119 《Java程序设计》第13周学习总结
  10. ACM 畅通工程
  11. windows pe
  12. HttpClient 通过代理访问验证服务器
  13. 在 Ubuntu14.04 上搭建 Spark 2.3.1(latest version)
  14. python requests 模块
  15. pycharm python3.5 神奇的导入问题
  16. DB2日志清理
  17. 屏蔽windows快捷键的方法
  18. CM005-逆向分析过程(上篇)
  19. 开源项目PullToRefresh详解(四)——PullToRefreshListView和ViewPager的结合使用
  20. C++ 定时器任务类实现

热门文章

  1. mpvue 未找到app.json入口文件
  2. ORACLE Physical Standby DG 之fail over
  3. r hive
  4. malloc(50) 内存泄露 内存溢出 memory leak会最终会导致out of memory
  5. create react app的 css loader 进行局部配置
  6. ContentProvider,ContentResolver和ContentObserver 使用
  7. 阶段1 语言基础+高级_1-3-Java语言高级_1-常用API_1_第5节 String类_1_字符串概述和特点
  8. CentOS 6 安装Syslog-ng
  9. myeclipse的修改背景颜色和字体
  10. 007/Docker(一)