1.1. 停止WAMP服务器.
2.下载要安装的PHP版本。下载Window版本的ZIP包啦:http://windows.php.net。解压到 Wamp的安装目录\bin\php\php7.2.3。
3.从已存在的php版本文件中(如php7.0.4 (eg. wamp/bin/php/php7.0.4)复制以下文件: - php.ini、phpForApache.ini和wampserver.conf到php7.2.3文件夹.
4.打开php7.1.0文件夹的以下文件: - php.ini和phpForApache.ini并且把其中所有的 7.0.4替换为7.1.0。
5.修改Wamp配置文件:进入 Wamp的安装目录,用IDE或记事本(最好使用行号定位的记事本,如EditPlus等)打开 wampmanager.ini,定位到 335 行,通常在这一行就是[phpVersion],如果不是,则在附近找找。复制下面一行:
插入到这一行前面,并修改为
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: run; FileName: "Wamp的安装目录/bin/php/php5.6.19/php-win.exe";Parameters: "switchPhpVersion.php 5.3.0";WorkingDir: "Wamp的安装目录/scripts"; Flags: waituntilterminated
Action: run; FileName: "Wamp的安装目录/bin/php/php5.6.19/php-win.exe";Parameters: "-c . refresh.php";WorkingDir: "Wamp的安装目录/scripts"; Flags: waituntilterminated
Action: run; FileName: "net"; Parameters: "start wampapache"; ShowCmd: hidden; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
插入这一段之前,并修改为
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: run; FileName: "Wamp的安装目录/bin/php/php5.3.0/php-win.exe";Parameters: "-c . refresh.php";WorkingDir: "Wamp的安装目录/scripts"; Flags: waituntilterminated
Action: run; FileName: "net"; Parameters: "start wampapache"; ShowCmd: hidden; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
6. 去wamp/bin/apache/apache/apache2.2.11/bin删除php.ini文件。
7..重启wamp.
8.选择phpphp7.2.3版本,选择后后会重启wamp。
9.可以打开phpinfo察看此时是否有phpphp7.2.3的信息,然后打开Phpmyadmin,看是否可以访问。
10.完成。