2016-10-30 16:14
浏览 41

“哪个php”在mac os中显示不正确的路径

I am doing "which php" in my mac book and its giving me the output as below :- /usr/bin/php

While in path variable its showing me :-

~ manishk$  echo $PATH

Which php should point to php-5.6.24 . Even php --version is giving me

PHP 5.4.30 (cli) (built: Jul 29 2014 23:43:29) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

I don't know where to set it to correct it .

图片转代码服务由CSDN问答提供 功能建议

我在我的Mac书中做“哪个php”,它给我输出如下: - < 代码> / usr / bin / php

在路径变量中它显示我: -

  ~manishk $ echo  $路径
 /应用/ XAMPP / xamppfiles / bin中/ PHP-5.6.24:/usr/local/rvm/gems/ruby-2.1.2/bin:

哪个php应该指向php-5.6.24。 Even php --version给了我

  PHP 5.4.30(cli)(建于2014年7月29日23:43:29)
版权所有(c)1997-2014  PHP Group 
Zend Engine v2.4.0,版权所有(c)1998-2014 Zend Technologies 

我不知道在哪里设置它来纠正它。< / p>

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douliang2935 2016-10-30 16:29

    The $PATH variable is ment as a list of directories, where your command binaries can be found. So, you have to add the directory where the php binary is located.

    For XAMPP this means, you'll have to add the following path to your $PATH variable:


    As this is a symlink to xamppfiles/bin, you can also use this one:

    点赞 评论

相关推荐 更多相似问题