php MAMP路径问题
您好,我下载了一些 PEAR 文件,它们位于我的 MAMP 目录的 bin 文件夹中。在 bin 文件夹内,它们位于一堆子文件夹中(php 5.3/lib/php/pear 等),如下所示。
但是,需要 PEAR 的文件位于 htdocs 中,因此它们根本没有连接。由于我是新手,我对从 bin 中的 php 文件夹中取出所有这些文件并将它们移动到 htdocs 中持谨慎态度,但将它们包含在 htdocs 中的每个文件中也将是一个复杂的文件路径。
有人用过梨子吗?是不是应该这样设置呢?
Pear 文件夹的更新屏幕截图,以及指出 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
Hi I downloaded some PEAR files and they're in the bin folder of my MAMP directory. Inside the bin folder, they're in a bunch of subfolders (php 5.3/lib/php/pear etc) as you can see below
However, the files that are requiring PEAR are in htdocs, so they're not connecting at all. As I'm a newbie I'm cautious about taking all of those files from the php folder in bin and moving them into htdocs, yet it would also be a complicated file path to include them in every file from htdocs.
Has anyone used Pear. Is it supposed to be set up like this?
UPDATE -screenshot of Pear folder, and also screenshot of terminal pointing out suggested locations for 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你下载的是它们还是 MAMP 附带的?你安装梨了吗?
你是什么意思
不管怎样,安装 pear 对于每个操作系统都是相似的。
因此,您必须在 PHP 5.3 文件夹中调用文件
php go-pear.phar
(这将安装 pear),如果没有,请尝试这些(请参阅 MacOS 安装,具体取决于您的操作系统版本)
http://pear.php.net/manual/en/installation.getting.php
重新安装你的 PEAR
http://www.bsp.ca/?p=108
然后你调用
sudo pear install package_name
您不需要在 htdocs 中包含任何内容。一旦安装了 PEAR 和相关包,需要 PEAR(或 PEAR 包)的文件将由 php 处理Did you downloaded them or the came with MAMP? Did you install pear??
what do you mean by
Regardless, installing pear is similar for every OS.
So, you have to call the file
php go-pear.phar
in your PHP 5.3 folder (that will install pear)if not, try these (see MacOS installation depending on your OS version)
http://pear.php.net/manual/en/installation.getting.php
to reinstall your PEAR
http://www.bsp.ca/?p=108
and then you call
sudo pear install package_name
you don't need to include anything in your htdocs. Files that need PEAR (or PEAR packages) will be handled by php once PEAR and related package is is installed