Php require_的问题曾经无法打开流:没有这样的文件或目录

Php require_的问题曾经无法打开流:没有这样的文件或目录,php,require,require-once,Php,Require,Require Once,在尝试打开我正在接管的项目的索引文件时,我遇到以下错误: Warning: require_once(core_services/logging.php): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com/index.php on line 7 Fatal error: require_once(): Fai

在尝试打开我正在接管的项目的索引文件时,我遇到以下错误:

Warning: require_once(core_services/logging.php): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com/index.php on line 7

Fatal error: require_once(): Failed opening required 'core_services/logging.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php') in /Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com/index.php on line 7
错误引用的代码如下所示:

7 require_once "core_services/logging.php";
8 $logger=new syslog_class(__FILE__,LOG_DEBUG);
我通过定义文件路径并在终端中回显它以及
logging.php
的内容来检查文件路径是否存在,并且该文件路径返回得很好,当我在第6行获得当前工作目录时,它返回
/Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com
,我假设它定义了我的根文件夹

我不知道该如何解决这个问题,如果有人对这个方法有任何想法,我很想听听他们的想法,因为我的PHP有点生疏,缺少wordpress的上下文之外的东西

编辑:到目前为止我已经尝试过的方法

require 'core_services/logging.php';
require '/core_services/logging.php';
require './core_services/logging.php';
require '../core_services/logging.php';
require '/Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com/core_services/logging.php';
require realpath(dirname(__FILE__)) .'/core_services/logging.php';
require(__DIR__"/../core_services/logging.php");

require_once 'core_services/logging.php';
require_once '/core_services/logging.php';
require_once './core_services/logging.php';
require_once '../core_services/logging.php';
require_once '/Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com/core_services/logging.php';
require_once realpath(dirname(__FILE__)) .'/core_services/logging.php';
require_once __DIR__"/../core_services/logging.php";

我还验证了这不是权限问题。

请尝试指定完整路径:

require './core_services/logging.php';
//OR
require '/Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com/core_services/logging.php';

尝试指定完整路径:

require './core_services/logging.php';
//OR
require '/Applications/XAMPP/xamppfiles/htdocs/app/docroot/www.website.com/core_services/logging.php';

尝试
require_once realpath(dirname(uu FILE_uu))。/core_services/logging.php'这种方法运气不好,它返回相同的错误,只是更新尝试的文件路径这种方法运气不好,它返回相同的错误,只是更新尝试的文件路径。不幸的是,这两种方法都不起作用。我只在更新文件路径时才会遇到相同的错误。您是在Windows还是Linux上?实际上,Mac使用XAMPPNO不确定,但它可能是另一种文件格式/名称吗?我的意思是,一切看起来都很好。不幸的是,这两种方法都不起作用。我只在更新文件路径时才会遇到相同的错误。您是在Windows还是Linux上?实际上,Mac使用XAMPPNO不确定,但它可能是另一种文件格式/名称吗?我是说,一切看起来都很好