目前我正在嘗試安裝Zend Framework。該框架附帶一個命令行工具,用於* nix系統的zf.sh
以及用於Windows系統的zf.bat
。要使用zf.sh
,我試圖將其添加到我的環境路徑中。不知何故,我無法讓它工作。將文件夾添加到環境變量
我~/.profile
export PATH=$PATH:/Applications/MAMP/bin/php/php5.3.6/bin/
export ZEND=/Applications/MAMP/bin/php/php5.3.6/bin/zf.sh
# 2012-06-05 make alias for zf
# Make an alias for the zf.sh so we can call it with zf instead of zf.sh
alias zf=/Applications/MAMP/bin/php/php5.3.6/bin/zf.sh
# Add the path to the Zend files so that the zf.sh can work with them
ZEND_TOOL_INCLUDE_PATH=/Applications/MAMP/bin/php/php5.3.6/lib/php/Zend
我/etc/paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
~/Development/play-2.0
/Applications/Racket\ v5.2/bin/
/Applications/MAMP/bin/php/php5.3.6/bin/
但是當我做echo $PATH
/usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/X11R6/bin
或者zf
fish: Unknown command 'zf'
但我必須將該行更改爲zf.sh的右側位置?所以在我的情況下,在'.bash_profile'中,'alias zf ='/ Applications/MAMP/bin/php/php5.3.6/bin/zf.sh'' – wowpatrick