php module 学习之一 php module 初探
原来 写php module 也并非很困难的事儿,其中参考的文章有: 编写自己的php扩展函数 zend manual 本文主要说一下 编译过程1 找到php的源代码,解压缩(如果已经安装的使用原来的安装源代码)2 使用 工具 ”ext_skel“ 初始化 module的代码, 这个工具 为你写好了,一些必要的代码. 工具位置: /ext/ext_skel 使用方法 : ext_skel --extname=模块名称 首先进到 /ext/ 目录, 之后执行-------------./ext_skel --extname=my_module-------------该工具会为你在 ext/ 下创建一个与模块名称相同的目录,并创建一些相关代码。 3 修改 config.m4 文件文件位置: /ext/模块名称/config.m4修改方法: 去掉 和 模块相关的 几行注释(3行) ( 将 dnl去掉,可选with,enable,我选的是with,因为字母少:P)4 修改 生成代码,创建自己的 函数 这部分怎么修改 可以参考 zend manual 来制作自己的功能函数我添加了 一个函数 weiping(); 输出 “welcome to my homepage: http://www.wmsp.org”具体做法 在Yorgo Su 的文章中有详细说明 5 返回 {phpsrc} 运行工具 buildconf有时可能会用 buildconf --force 来强制执行 6 configure 重新配置./configure --with-模块名称7 make 不用多说了 , 打make就行8 测试写一个你模块中的测试函数,然后用 刚编译好的 php 来执行9 重新编译apache,加入 新的php模块 libphp4.a下一篇: php module 学习之(二) zend 引擎分析(待续)相关文章:config.m4 buildconf

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Linux new version
SublimeText3 Linux latest version
