Home > Article > Backend Development > PHP version coexistence
This article mainly introduces the content about the coexistence of PHP versions, which has certain reference value. Now I share it with everyone. Friends in need can refer to it
1. Update source ubuntu
sudo add-apt-repository ppa:ondrej/phpsudo apt upgradesudo apt update
下载php7.1的命令 sudo apt-get install -y php7.1-common php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-gd php7.1-curl php7.1-json php7.1-fpm php7.1-zip php7.1-mcrypt libapache2-mod-php7.1
;; 开启一个php版本sudo a2enmod php7.1 ;; 禁用一个php版本sudo a2dismod php7.1 ;; 重启Apache2sudo service apache2 restart
Modification
php.ini extension=php_pdo.dll //开启PDO extension=php_pdo_mysql.dll //PDO 访问mysql 驱动
Related recommendations:
php version switching Detailed process and common php-fpm FAQs in online Linux environment
The above is the detailed content of PHP version coexistence. For more information, please follow other related articles on the PHP Chinese website!