Home  >  Article  >  Backend Development  >  How to modify php environment variables on mac

How to modify php environment variables on mac

藏色散人
藏色散人Original
2021-06-19 15:45:082468browse

How to modify the php environment variable on 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 through "which php".

How to modify php environment variables on mac

The operating environment of this article: Windows 7 system, php version 7.2.8, Dell G3 computer.

How to modify php environment variables on mac?

How to modify the default PHP environment variable under Mac

vim ~/.bash_profile

Enter your new target PHP path

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

Then exit and Save and run the .bash_profile file

source .bash_profile

Check whether it takes effect

which php

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to modify php environment variables on 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