/home/name_a/folder/public_html/index.php 脚本:
include_once('/home/name_b/folder/public_html/index.inc.php');
index.inc.php 脚本:
define("ROOT", __DIR__ ."/");
$pages_dir = 'pages';
include ($page_dir.'/'.filename.php');
$pages = scandir($pages_dir, 0);
print_r($page);
我的问题是,包含文件工作正常(/home/name_b/folder/public_html/pages/filename.php),但scandir 会寻找/home/name_a/folder/public_html/pages。任何想法?