"below" 根文件的正确路径是什么?

What is the correct path to a file "below" the root?

我安装了 bitnami Wordpress。通过 FTP 导航时,Wordpress 的目录树是 home/bitnami/apps/wordpress/htdocs。浏览时,这充当根目录。

我添加了几个需要通过 Composer 使用的包(AWS SDK、Facebook SDK 等)。Composer 在 home/bitnami/vendor 安装这些包。我似乎找不到这些文件的正确路径。

我在名为 test-dir (home/bitnami/apps/wordpress/htdocs/test-dir/test.php) 的 Wordpress 根目录的子目录中创建了一个名为 "test.php" 的文件。我想在 test.php 中获取文件 home/bitnami/vendor/required.php。 required.php 的正确路径是什么?这是我的第一个猜测(抛出 HTTP 错误 500):

test.php:

<?php
require '../../../../vendor/required.php';

正确的路径是什么?

简单的解决方案是使用绝对路径:

<?php
require '/home/bitnami/vendor/required.php';