繁体   English   中英

PHP的MAMP路径问题

[英]php MAMP path problem

嗨,我下载了一些PEAR文件,它们位于MAMP目录的bin文件夹中。 在bin文件夹中,它们位于一堆子文件夹(php 5.3 / lib / php / pear等)中,如下所示

但是,需要PEAR的文件位于htdocs中,因此它们根本没有连接。 由于我是新手,因此对于从bin中的php文件夹中获取所有这些文件并将它们移至htdocs中时,我非常谨慎,但是将它们包含在htdocs的每个文件中也将是一个复杂的文件路径。

有没有人用过梨。 是否应该这样设置?

MAMP文件夹中的bin和htdocs

内仓

UPDATE-Pear文件夹的屏幕快照,以及终端的屏幕快照,指出了梨的建议位置 梨

码头问我在哪里放梨

# Setting PATH for MacPython 2.6
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH

# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH

#I HAVE ADDED THE PATH HERE
export PATH=$PATH:/usr/local/mysql/bin:/Users/michaelmitchell/pear/bin/


# Setting PATH for Python 3.2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.2/bin:${PATH}"
export PATH



File Name to Write: .bash_profile    (HIT ENTER)                                           
^G Get Help         ^T To Files         M-M Mac Format      M-P Prepend
^C Cancel           M-D DOS Format      M-A Append          M-B Backup File

嗨,我下载了一些PEAR文件

您下载了它们还是MAMP附带了? 您安装了梨吗?

你是什​​么意思

要求PEAR的文件是htdocs

无论如何,对于每个OS而言,安装pear都是相似的。 因此,您必须在PHP 5.3文件夹中调用php go-pear.phar文件(这将安装pear)

如果不是,请尝试以下操作(请根据您的操作系统版本查看MacOS安装)

http://pear.php.net/manual/en/installation.getting.php

重新安装您的梨

$ wget http://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar

http://www.bsp.ca/?p=108

然后调用sudo pear install package_name您不需要在htdocs中包含任何内容。 一旦安装了PEAR和相关的软件包,需要PEAR(或PEAR软件包)的文件将由php处理。

# Setting PATH for MacPython 2.6
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin:${PATH}"
export PATH

# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH

#I HAVE ADDED THE PATH HERE
export PATH=$PATH:/usr/local/mysql/bin:/Users/michaelmitchell/pear/bin/


# Setting PATH for Python 3.2
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.2/bin:${PATH}"
export PATH

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM