首頁  >  文章  >  後端開發  >  WAMP 新增php新版本

WAMP 新增php新版本

不言
不言原創
2018-04-24 09:13:362816瀏覽

這篇文章主要介紹了WAMP 新增php新版本,有著一定的參考價值,現在分享給大家,有需要的朋友可以參考一下

1.1.  停止WAMP伺服器.

#2.下載要安裝的PHP版本。下載Window版本的ZIP套件囉:http://windows.php.net。解壓縮到 Wamp的安裝目錄\bin\php\php7.1.0--- 注意自己是vc11還是vc14 vc 9

3.從已存在的php版本檔案(如php7.0.4 (eg.   wamp/bin/php/php7.0.4 )複製以下檔案: -  php.ini、phpForApache.ini和wampserver.conf到php7.1.0資料夾.

4.開啟php7.1.0資料夾的下列檔案: -   php.ini和phpForApache.ini並且把其中所有的7.0.4替換為7.1.0。使用行號定位的記事本,如EditPlus等)開啟wampmanager.ini,定位到335 行,通常在這一行就是[phpVersion],如果不是,則在附近找找。 Type: item; Caption: "5.6.19"; Action: multi; Actions:switchPhp7.0.4
插入到這一行前面,並修改為

#Type: item; Caption: "5.6.19" ; Action: multi; Actions:switchPhp7.1.0[switchPhp5.3.0]

Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated

Action: run; Name: "
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: waituntilterminatedAction: run; FileName: "net"; Parameters: "start wampapache"; ShowCmd: hidden; Flags: waituntilterminatedAction: resetservices
Action: readconfig;插入這段之前,並修改為

##[switchPhp
7.1. 0

]

Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: run; FileName: "

Wamp的安裝目錄目錄

##Action: run; FileName: "Wamp的安裝目錄目錄

#Action: /bin/php/php5.3.0/php-win.exe";Parameters: "switchPhpVersion.php7.1.0";WorkingDir: "

Wamp的安裝目錄

/scripts"; Flags: waituntilterminatedAction : 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: waituntilterminatedAction: resetservices#Action: resetservices#Action: resetservices#Action: resetservicesAction: readconfig;

6. 去wamp/bin/apache/apache/apache2.2.11/bin刪除php.ini檔案。

7..重啟wamp.
8.選擇php7.1.0版本,選擇後後會重新啟動wamp。
9.可以開啟phpinfo察看此時是否有php7.1.0的訊息,然後開啟Phpmyadmin,看是否可以存取。
10.完成。
(注意:php7.1.0不支援mysql-connect()連接mysql資料庫)

#相關推薦:

nginx新增php basic驗證

#

以上是WAMP 新增php新版本的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn