1. 打开环境,在根目录下的index.php,输入以下图中所示代码,保存。
完成后,在浏览器中输入网址: localhost/index.php 或 127.0.0.1/index.php

2. phpinfo( )函数会打印出当前使用的php环境的详细配置

3. 在php环境的程序安装文件夹,可以看到有许多的.dll后缀文件。
这些是自带的php扩展,已经在使用中了,大都不需要做改动。
文件夹ext下面也有很多外置扩展,这些扩展按自身需求开启。


4. 在php安装的根目录,找到php的配置文件,apmser和wamp的php配置文件是(php.ini);phpnow的是php.ini-dist,使用编辑器打开配置文件,查找"extension",找到有很多extension聚集的地方,再查找具体需要的php扩展


5.找到扩展后,把扩展前面的“;”号去掉,并保存。再重启php环境,这样扩展就生效了

6. 如果现有的php展无法满足需求时,可以在php.net官网中下载所需的扩展文件。

7.下载完成的扩展.dll文件,一般都要求先注册。在完成注册后,在php的配置文件里加上extension=扩展名