zoukankan      html  css  js  c++  java
  • PHP扩展开发

    安装好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(" Hello World!")." ";'
    Congratulations! You have successfully modified ext/mytest/config.m4. Module 
    Hello World! is now compiled into PHP.
  • 相关阅读:
    slf4j + log4j 记录日志
    Executors介绍
    Java集合(JDK1.6.0_45)
    Java多线程系列目录(共43篇)
    线程池体系
    FutureTask
    23种设计模式分类
    结构型 之 适配器模式
    信号量Semaphore详解以及应用
    Excel格式转化工具
  • 原文地址:https://www.cnblogs.com/zbseoag/p/6102040.html
Copyright © 2011-2022 走看看