dongxi5423 2018-10-04 08:17
浏览 135

在macOS High Sierra上从默认的PHP 7.1降级到PHP 7

I have a fresh installation of macOS High Sierra which comes with PHP 7.1.16 (Build date: Mar 31 2018 02:53:20) installed. I would like to downgrade this to PHP 7.0.27.

PHP 7.1.16 wasn't installed with homebrew, so I assume it's not as easy as removing it and installing PHP 7 with brew.

What is the best and safest way to do this?

There's many resources to upgrade from PHP 7 -> 7.1 or 7 -> 7.2, but nothing to go the other way on macOS.

PHP 7.1.16 (cli) (built: Mar 31 2018 02:59:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
  • 写回答

1条回答 默认 最新

  • dtl85148 2018-10-04 08:21
    关注

    The best solution as far for my purposes was the shell tool "update-alternatives".

    With that you should be able to switch between diffrent php versions dependently on your project.

    So for example to switch to anohher php version set:

    update-alternatives --set php=path to your php 
    
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!