我正在尝试使用 PEAR 和 PHP 创建一个网格日历,但是当我在浏览器中预览文件时,我得到以下信息:
*Warning: include(Calendar/Month/Weekdays.php) [function.include]:
failed to open stream: No such file or directory
in /Users/x/Sites/p/testing pages/Pear_Date.php on line 8
Warning: include() [function.include]: Failed opening 'Calendar/Month/Weekdays.php'
for inclusion (include_path='.:') in /Users/x/Sites/p/testing pages/Pear_Date.php
on line 8
Fatal error: Class 'Calendar_Month_Weekdays' not found
in /Users/x/Sites/p/testing pages/Pear_Date.php on line 10*
我以为我之前已经解决了这个问题。PEAR 的安装日志指出:
*Current include path : .:
Configured directory : /Users/x/PEAR
Currently used php.ini (guess) :
Press Enter to continue:
The 'pear' command is now at your service at /Users/x/bin/pear
** The 'pear' command is not currently in your PATH, so you need to
** use '/Users/x/bin/pear' until you have added
** '/Users/x/bin' to your PATH environment variable.*
我发现一篇我认为解决了我的问题的文章 -如何在 Mac OS X 10.5 Leopard 上设置 PEAR
所以我在我的 php.ini 文件中编辑了 include_path 行,所以它显示include_path = ".:/php/includes:/Users/x/bin/pear"
我还更新了我的.bash_profile
文档,所以它export PATH=/Users/x/bin:$PATH
像文章所说的那样声明
希望能给你足够的信息来帮助。