📜  mamp 更改 php 版本 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:22.105000             🧑  作者: Mango

代码示例1
As mentioned by @Scott in the comments under your question:

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

And the answer in that links is:

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.

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.