【发布时间】:2012-08-09 19:29:38
【问题描述】:
我遇到了一个奇怪的问题,我在我的 MacBook Pro 上尝试了 MAMP 和 PhP / Apache 的标准安装,但总是得到这个错误
警告: 需要一次(../interfaces/class-ai1ec-get-data-from-cache.php): 无法打开流:中没有这样的文件或目录 /usr/local/zend/apache2/htdocs/wordpress/wp-content/plugins/all-in-one-event-calendar-premium/app/strategies/get_data_from_cache/class-ai1ec-get-data-from-db-cache .php 在第 3 行致命错误:require_once():需要打开失败 '../interfaces/class-ai1ec-get-data-from-cache.php' (include_path='.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear') 在 /usr/local/zend/apache2/htdocs/wordpress/wp-content/plugins/all-in-one-event-calendar-premium/app/strategies/get_data_from_cache/class-ai1ec-get-data-from-db-cache .php 在第 3 行
来自这个电话
require_once ( '/../interfaces/class-ai1ec-get-data-from-cache.php' );
我是 Mac 新手,所以它一定很愚蠢,但我被阻止了。
当然每个版本我都试过了
require_once ( '../interfaces/class-ai1ec-get-data-from-cache.php' );
require_once ( './../interfaces/class-ai1ec-get-data-from-cache.php' );
【问题讨论】:
-
我知道这听起来很愚蠢,但是,您尝试请求的文件存在于您尝试请求它们的路径中,对吗?
-
@sabre 当然,在 Windows 上一切正常
-
好吧,这是排除了一个潜在问题;)。另一种可能是您的 include_path 设置不正确?
-
@sabre 我的想法只是告诉:“上一个目录,然后获取接口/class-ai1ec-get-data-from-cache.php”,也许这是包含的问题,正确现在我的包含路径是 (include_path='.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear')