What functions in PHP can be used to check if a file exists and resolve relative paths to absolute paths?

To check if a file exists in PHP, you can use the `file_exists()` function. To resolve relative paths to absolute paths, you can use the `realpath()` function. By combining these two functions, you can first check if the file exists using `file_exists()` and then get the absolute path using `realpath()`.

$file = 'example.txt';

if(file_exists($file)){
    $absolute_path = realpath($file);
    echo "File exists at: " . $absolute_path;
} else {
    echo "File does not exist.";
}