有时候服务器中安装了好几个 PHP 版本,然后我们 php -v 下并不是我们想要的版本,我们可以采用如下命令快速切换
update-alternatives --config php
然后选择我们想要切换的环境即可.