mac php-frm xampp,Mac OSX PHP和XAMPP路径问题

I have installed XAMPP on Mac OSX running Yosemite

I have created the .bash_profile file like this:

export XAMPP_HOME=/Applications/XAMPP/xamppfiles

export PATH=${XAMPP_HOME}/bin/php:${PATH}

export PATH

When I type echo $PATH in terminal, I get correct XAMPP path

But when I type "which php" it shows /usr/bin/php

How can I make my XAMPP use the correct php instead of default php that came with mac?

解决方案

To use the XAMPP PHP and other binaries found in /Applications/XAMPP/bin/ by default this is the correct entry for ~/.bash_profile

export XAMPP_HOME=/Applications/XAMPP

export PATH=${XAMPP_HOME}/bin:${PATH}

export PATH

Load the changes with this (won't be needed next time you open a shell session):

source ~/.bash_profile

Confirm:

$ which php

/Applications/XAMPP/bin/php

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值