Home >Backend Development >PHP Problem >How to modify the path of php command line under mac
How to modify the path of the php command line under mac: 1. Open the "~/.bash_profile" configuration file; 2. Configure the php binary file path; 3. Execute the "~/.bash_profile" command to make the configuration immediate Take effect.
The specific method is as follows:
(Recommended tutorial: php graphic tutorial)
1 , open the configuration file
sudo vim ~/.bash_profile
2, add the following code
PATH="/Applications/MAMP/bin/php/php7.0.8/bin:$PATH"export PATH
3, refresh
source ~/.bash_profile
(video tutorial recommendation: php video tutorial )
4. Check the version
php -v
5. Check the binary execution path of the php command
which php
The above is the detailed content of How to modify the path of php command line under mac. For more information, please follow other related articles on the PHP Chinese website!