0

I'm using Macports for my PHP development. I thought that everything associated with Macports should be located under/opt/local, but I can't load the PEAR::Mail_Mime package I just installed through PEAR. I did confirm that the path to pear is /opt/local/bin/pear, but I have no idea where it dumped the package files, so I don't know how to include them in my path. Any pointers?

4

2 回答 2

3

如果您使用 pear 命令安装软件包,您也可以这样做

$ pear list mail_mime

获取该软件包中所有文件的列表以及它们的安装位置。这是查找示例文件的便捷方式,尤其是与grep;-)一起使用时

于 2010-02-24T16:12:07.370 回答
2

Pear 文件通常安装在 share/php 目录中,尽管我现在不在我的 mac 上,所以我无法准确检查它可能在哪里。您可以使用 locate 找到该目录。从您的终端类型:

$ locate PEAR.php

它应该返回类似的东西/usr/share/php/PEAR.php- 在这个例子/usr/share/php中应该在我的包含路径中。 Mail.php并且Mail/mime.php也应该在这个目录中。

于 2010-02-19T20:11:20.400 回答