【问题标题】:How to update php 5.4 to 7.0 via CLI in Windows如何在 Windows 中通过 CLI 将 php 5.4 更新到 7.0
【发布时间】:2020-05-31 12:41:21
【问题描述】:

我使用这个命令:

export PATH=/usr/local/php7/bin:$PATH

但仍然显示:

PHP 5.4.45 (cli)(构建时间:2017 年 4 月 17 日 15:59:08) 版权所有 (c) 1997-2014 PHP 集团 Zend Engine v2.4.0,版权所有 (c) 1998-2014 Zend Technologies 使用 ionCube PHP Loader(已启用)+ ioncube24.com(未配置)v10.2.4 的入侵保护,版权所有 (c) 2002-2018,由 ionCube Ltd. Zend Guard Loader v3.3,版权所有 (c) 1998-2013,由 Zend Technologies 提供

我需要解决这个问题,帮帮我。

【问题讨论】:

    标签: php windows ssh command-line-interface putty


    【解决方案1】:

    您是通过配置文件执行此操作的吗?

    1. 如果.profile文件不存在,您可以创建它:touch ~/.profile
    2. 编辑 .profile 文件:nano ~/.profile
    3. 在文件中添加此代码以选择所需的 php 版本:export PATH=/opt/php7.0/bin:$PATH
    4. 加载 .profile 文件:source ~/.profile
    5. 再次检查版本:php -v

    【讨论】:

    • 您可能需要发送hash -r 才能使更改生效。还可以尝试使用绝对路径运行,以验证它是否在您添加到搜索路径中的位置。
    猜你喜欢
    • 2018-11-14
    • 2018-07-31
    • 1970-01-01
    • 2013-06-08
    • 1970-01-01
    • 1970-01-01
    • 2018-06-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多