Home  >  Article  >  Backend Development  >  How to change php environment variables under mac

How to change php environment variables under mac

coldplay.xixi
coldplay.xixiOriginal
2021-04-12 17:44:074618browse

How to change the PHP environment variable under mac: first enter the new path of the target PHP; then exit and save, run the [.bash_profile] file; finally check whether it takes effect.

How to change php environment variables under mac

The operating environment of this tutorial: macOS 11.3 system, PHP version 5.6, DELL G3 computer.

How to change the PHP environment variables under mac:

How to modify the default PHP environment variables under Mac

vim ~/.bash_profile

Enter your new target PHP path

export PATH="/Applications/MAMP/bin/php/php7.2.8/bin:$PATH"

How to change php environment variables under mac

Then exit and save, run the .bash_profile file

source .bash_profile

Check whether it takes effect

which php

How to change php environment variables under mac

If you want to know more about free learning, please pay attention to the php training column!

The above is the detailed content of How to change php environment variables under mac. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn