php中的警告错误


warning errors in php

我开始在一个已经有一段时间的网站上工作。甚至在我开始之前,它就产生了以下错误消息:

Warning: main(includes/main_functions.php) [function.main]: failed to open stream: No such file or directory in ''boswinfs01'home'users'web'b748'ez.paphospro'includes'top.php on line 22

Warning: main() [function.include]: Failed opening 'includes/main_functions.php' for inclusion (include_path='.;c:'php'4'pear') in ''boswinfs01'home'users'web'b748'ez.paphospro'includes'top.php on line 22

Warning: main(includes/functions/functions_email.php) [function.main]: failed to open stream: No such file or directory in ''boswinfs01'home'users'web'b748'ez.paphospro'includes'top.php on line 23

Warning: main() [function.include]: Failed opening 'includes/functions/functions_email.php' for inclusion (include_path='.;c:'php'4'pear') in ''boswinfs01'home'users'web'b748'ez.paphospro'includes'top.php on line 23

Fatal error: Call to undefined function: get_includes_file() in ''boswinfs01'home'users'web'b748'ez.paphospro'includes'top.php on line 24

可能是include 'top.php文件中的路径不正确吗?还是我需要找点别的?

top.php文件包含以下代码:define('BASE_PATH' , '/--/--/--/--/--/--/');(在这个例子中我去掉了路径)。

,在第22、23、24行,有如下代码:

 `include("includes/main_functions.php");
  include("includes/functions/functions_email.php");
  include(get_includes_file("includes/config.php"));`

以上所有文件都在服务器上的这些目录下。

我真的需要一些指导,为什么会有错误,我能做些什么来修复它们。

感谢所有的帮助和建议。

脚本文件不存在或文件权限错误。

我建议你做一些重构,用require_once代替include函数。这样你会得到一个致命的E_COMPILE_ERROR级别的错误,这比一个误导人的应用程序要好。

那么你必须定义你的应用程序基路径define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR);,并使用它来引用所有其他应用程序依赖(例如require_once(DOCROOT.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'main_functions.php');

)。