How to deploy php environment variables on mac: first open the configuration file; then enter the php path, such as [export PATH="/Applications/MAMP/bin/php/php7.2.8/bin:$PATH"]; Finally, re-run the configuration file.
The operating environment of this article: macos x system, php 7.3, macbook pro computer.
It is not difficult to deploy PHP environment variables on a Mac computer. You only need to follow the steps below to complete it step by step.
Specific steps:
Open the configuration file
vim ~/.bash_profile
Enter your target PHP path
export PATH="/Applications/MAMP/bin/php/php7.2.8/bin:$PATH"
Then exit and save, run .bash_profile File
source .bash_profile
Check whether it takes effect
which php
The above is the detailed content of How to deploy php environment variables on mac. For more information, please follow other related articles on the PHP Chinese website!