繁体   English   中英

PHP 版本在浏览器和命令行中显示不同

[英]PHP version showing different in browser and command line

The PHP version is showing different php -v showing PHP 7.2.19 while http://localhost/dashboard/phpinfo.php showing 7.1.13, I want 7.2.19, How to solve this issue, Thank you in advance

嘿,从您的系统中卸载所有 PHP 版本。 并尝试安装新的 PHP 版本 7.2.19 就可以了

PHP 在 CLI 上显示不同的版本意味着 Xampp/Wamp 是旧版本。 您可以升级它们,或者您可以卸载然后使用所需版本再次重新安装 PHP。 您可能已经单独安装了 PHP 并且还一起安装了 Xampp/Wamp,这就是 PHP 版本不匹配的原因。

If you have installed a fresh wamp or xampp then this should not be the case, plz check the path of PHP environmental variable (command line php -v pick this path) and check the PHP path on the webpage by using phpinfo() and you会发现有两个 PHP 版本正在运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM