0

我的 laravel 宅基地上有不同版本的 PHP。如果我在命令 bash 上午餐 php -v 我有活动的 php 7.3 但如果我使用 phpinfo() 创建和 index.php 我有这个'PHP 版本 7.2.14-1+ubuntu18.04.1+deb.sury.org+1'

php -v

HP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 (cli) (build: Jan 13 2019 10:19:33) (NTS) 版权所有 (c) 1997-2018 The PHP Group Zend Engine v3. 3.1, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.1-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies with Xdebug v2.7.0beta1,版权所有 (c) 2002-2018,由 Derick Rethans 使用 blackfire v1.24.2~linux-x64-non_zts73,https: //blackfire.io ,由Blackfire

在我的 index.php

phpinfo();

我有

PHP 版本 7.2.14-1+ubuntu18.04.1+deb.sury.org+1

我只想使用 php 7.3 我该怎么做呢?

4

1 回答 1

1

对于 ubuntu 用户,这应该可以工作(使用 apache)

sudo a2dismod php7.X
sudo a2enmod php7.3
sudo service apache2 restart

在您的 .conf 中使用 nginx 更改 fastcgi 的版本

fastcgi_pass unix:/run/php/php7.3-fpm.sock;
service nginx restart
于 2019-01-30T19:06:12.623 回答