Ubuntu16.04中php如何切換版本


其實就是一條Linux命令,如下:

sudo update-alternatives --config php

會出現下面選項:

There are 2 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/php7.1   71        auto mode
  1            /usr/bin/php7.0   70        manual mode
  2            /usr/bin/php7.1   71        manual mode
Press <enter> to keep the current choice[*], or type selection number:

輸入其中一項數字即可實現php版本切換

如何判斷版本是否切換成功?
php -v命令進行前后版本對比即可看出。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM