问题
I have updated my PHP version to 7.2
in my Ubuntu machine. I am getting this version while running this php -v
command in my terminal and getting the below output.
PHP 7.2.1-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jan 11 2018 22:52:58) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.1-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
But when I am running localhost file localhost/test/common.php
the lower version is coming.
common.php:
<?php
phpinfo();
?>
the above file is giving the below output.
PHP Version 5.6.23
System Linux subrajyoti-H81M-S 3.13.0-139-generic #188-Ubuntu SMP Tue Jan 9 14:43:09 UTC 2018 x86_64
Build Date Jun 24 2016 15:40:58
I am running this file via lampp
. But here it is showing me the lower php version (i.e - 5.6.23
). I need here to upgrade the php version also.
来源:https://stackoverflow.com/questions/48319731/in-localhost-its-still-showing-the-lowest-version-using-ubuntu