duanshan1511 2016-10-30 16:14
浏览 46
已采纳

“哪个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
/Applications/XAMPP/xamppfiles/bin/php-5.6.24:/usr/local/rvm/gems/ruby-2.1.2/bin:

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 .

  • 写回答

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:

    /Applications/XAMPP/bin
    

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

    /Applications/XAMPP/xamppfiles/bin
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?