我无法从根目录将文件包含在文件夹中。这里有一些类似于我正在尝试做的事情。
Root:
-folder1
--folder2 (I need to include stuff in this folder)
-otherfolder1
--otherfolder2
--otherfolder3 (This is my website folder)
到目前为止,这就是我的道路,但没有奏效。
define("FOLDER2_ROOT", "/folder1/folder2/");
/用于向上移动一个文件夹。
因此,根据您的情况,您需要以下代码:
include("../../../folder1/folder2/abc.php");