如何在MAMP 4.1上更改PHP版本 [英] How to change PHP version on MAMP 4.1

查看:127
本文介绍了如何在MAMP 4.1上更改PHP版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac上下载了MAMP 4.1;默认情况下,我只能使用7.0.15和7.1.1的PHP版本

I downloaded MAMP 4.1 on my Mac; by default, the only PHP versions I can use are 7.0.15 and 7.1.1

如何使用PHP 5.6?

How can I use PHP 5.6?

我在此处尝试了解决方案我应该将不想使用的版本重命名为其他版本.但这对我不起作用.

I tried the solution here Which says I should rename the versions I don't want to use to something else. But it didn't work for me.

推荐答案

@Scott在您的问题下的评论中提到:

As mentioned by @Scott in the comments under your question:

您在这里是正确的链接.使用底部答案来重命名 bin/php目录. MAMP首选项窗格将显示最新的2个 php目录中的版本. –斯科特·艾森伯格

Your here is the right link. Use the bottom answer to rename the bin/php directory. The MAMP preference pane will show the 2 latest versions in the php directory. – Scott Eisenberg

该链接的答案是:

如果服务器正在运行,请先停止它.转到"/Applications/MAMP/bin/", 重命名不需要的PHP版本(仅允许MAMP使用2 PHP版本),例如"_php5.2.17".现在MAMP将使用php版本 剩下的.转到MAMP管理器,然后进行设置,然后切换 到您需要的php版本.

First stop the Server if its running. Go to "/Applications/MAMP/bin/", rename the PHP Version you don't need (MAMP is only allowed to use 2 PHP Versions), e.g. "_php5.2.17". Now MAMP will use the php versions that are left. Go to the MAMP Manager and then settings, then switch to the php version you need.

对于我(和您的情况类似),我将名为php7.1.1的文件夹重命名为_php7.1.1,现在MAMP在首选项窗格中显示5.6.307.0.15.

In my case (and similarly yours), I renamed the folder named php7.1.1 to _php7.1.1 and now MAMP shows me 5.6.30 and 7.0.15 in the preferences pane.

这篇关于如何在MAMP 4.1上更改PHP版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆