What are some different ways to access information from a file in a different directory using PHP?

When accessing a file in a different directory using PHP, you can use either relative or absolute paths. Relative paths are based on the current directory, while absolute paths start from the root directory. You can also use functions like `file_get_contents()` or `fopen()` to read the file contents.

// Using relative path
$file = '../directory/file.txt';
$content = file_get_contents($file);
echo $content;

// Using absolute path
$file = '/var/www/html/directory/file.txt';
$content = file_get_contents($file);
echo $content;