win10下php拓展环境搭建

需要下载的有:1.php源码,2.cygwin,3.编译器(vc++6.0),4.安装好配置环境变量的php程序
php源码 php5.5.38
这里使用的是php5.5.38源码
下载完成解压到d:/phpsrc目录,在下载cygwin cygwin官网
选择自己系统的位数下载,下载完成安装,在选择网址的时候选择
http://mirrors.sohu.com/cygwin/这个镜像网站比较快,安装完成cygwin.
cmd进入d:/phpsrc/php5.5.38-src/ext目录 运行命令:

php ext_skel_win32.php –extname=test_ext
1.  $ cd ..
2.  $ vi ext/myphpexs/config.m4
3.  $ ./buildconf
4.  $ ./configure --[with|enable]-myphpexs
5.  $ make
6.  $ ./sapi/cli/php -f ext/myphpexs/myphpexs.php
7.  $ vi ext/myphpexs/myphpexs.c
8.  $ make

Repeat steps 3-6 until you are satisfied with ext/myphpexs/config.m4 and
step 6 confirms that your module is compiled into PHP. Then, start writing
code and repeat the last two steps as often as necessary.

出现这个说明骨架搭建完成。创建了新目录test_ext.进行下一步。用vc打开新目录的dsp项目文件编译dll,把编译好的dll文件放入4中安装好的php程序ext目录
最后在phpini中添加extension=test_ext.dll即可最后在phpinfo()函数中查看即可。以上就是在win10下php拓展环境的搭建。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值