附图显示了文件的位置,它将帮助您给出答案。我想包含 'db/functions.php'
在我的文件中'process/delete.php'
,但没有任何效果。我在开始时尝试过关注'delete.php'
include_once '/db/functions.php';
include_once './db/functions.php';
include_once '../db/functions.php';
include_once $_SERVER['DOCUMENT_ROOT'].'/db/functions.php';
当我打开 MAMP/log/php_error.log 文件时,它显示以下错误
[28-Jul-2012 21:55:23] PHP Warning: include_once()
[<a href='function.include'>function.include</a>]:
Failed opening '/db/functions.php' for inclusion
(include_path='.:/Applications/MAMP/bin/php/php5.3.6/lib/php') in
/Applications/MAMP/htdocs/electromart/process/delete.php on line 3
其中第 3 行是包含语句。