我使用 nginx 在 ubuntu16.04 上将 PHP 从 7.0.27 版升级到 7.2 版。
当我在终端上运行 php -v 时,我可以看到:
PHP 7.2.2-3+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 6 2018 16:11:23) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.2-3+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)
但是当我在浏览器中看到回显 phpinfo() 时,它显示了旧版本的 PHP,例如:
PHP Version 7.0.27-1+ubuntu16.04.1+deb.sury.org+1
Run Code Online (Sandbox Code Playgroud)
这意味着 nginx 没有使用 PHP7.2,我需要为此进行配置。请,任何帮助表示赞赏。
提前致谢。