Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/238.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP服务器日志错误_Php - Fatal编程技术网

PHP服务器日志错误

PHP服务器日志错误,php,Php,请找个人来帮我 PHP Fatal error: require_once() enter code here[<a href='function.require'>function.require</a>]: Failed opening required '/include/tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/uaeadver/pub

请找个人来帮我

PHP Fatal error:  require_once() enter code here[<a     href='function.require'>function.require</a>]: Failed opening required     '/include/tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in     /home2/uaeadver/public_html/include/include.php on line 14

如果两个文件位于同一目录中,请尝试

require_once('include.php');
并用于退出dir
。/

require_once('../include.php');

您尝试访问基本目录的方式实际上不起作用,或者您尝试包含的文件不存在

如果有帮助,使用函数
getcwd()
返回当前工作目录

通常,您总是从相同的路径启动应用程序,您可以
define()
一个绝对基本路径并使用它:

// define'd constants are always global scope:
define('BASE_PATH', '/home2/uaeadver/public_html/');

require(BASE_PATH . 'include/config.php');
缺少
退出位置更改后:

if(!file_exists($path.'/../config.php')) {
    header("Location: install/"); 
    exit;
}

您的代码风格确实需要改进。不要使用globals,尝试真正的设计模式和严格的编码标准。

将您的代码和路径显示在与
include.php
位于同一文件夹的tables.php和include.phpIs
tables.php
中,您将
/include/tables.php
包含在
/include//code>中的文件中,这意味着您将包含
/include/include/tables.php
。我认为您的文件include path缺少对您的回复rakesh的支持,但我不敢告诉您我对php不太了解,所以您能在这方面帮助我吗,我甚至想找一些php人员帮忙,但他们要求一次性支付moneyecho$config_abs_path./include/tables.php并显示您的输出我可以有您的电子邮件id或其他我真的需要帮助的东西吗?如果可以,请检查错误oxyclassifieds中的一个分类脚本,他们告诉我这是最新的,并给了我所有这些东西代码样式从来都不是新的outdated@user3640582哦,哈哈。他们在1999年的脚本和代码风格中有错误。。严重不严重:D尝试替换
require_一次($config_abs_path.'/include/tables.php')
by
require_once('tables.php')将来有可能更改代码样式吗对不起,我是个新手,这就是为什么我要问你,非常感谢你的帮助buddy@user3640582搜索
php设计模式
php代码样式
if(!file_exists($path.'/../config.php')) {
    header("Location: install/"); 
    exit;
}