Skip to content

Instantly share code, notes, and snippets.

@sword-jin
Created June 26, 2016 09:10
Show Gist options
  • Save sword-jin/c7b43b3e57776b62f6dbd0bf8ef76d7a to your computer and use it in GitHub Desktop.
Save sword-jin/c7b43b3e57776b62f6dbd0bf8ef76d7a to your computer and use it in GitHub Desktop.
php5.6 php7.0 切换

From php5.6 to php7.0 :

Apache:

sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart

CLI:

sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php

from php7.0 to php5.6:

Apache:

sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart

CLI:

sudo ln -sfn /usr/bin/php5.6 /etc/alternatives/php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment