What is the function in PHP to determine the existence of a file?

To determine the existence of a file in PHP, you can use the `file_exists()` function. This function checks whether a file or directory exists at a specified path and returns true if it exists, and false if it does not. You can use this function to perform actions based on the existence of a file, such as displaying a message or including the file in your script.

$file_path = 'path/to/file.txt';

if (file_exists($file_path)) {
    echo "The file exists.";
} else {
    echo "The file does not exist.";
}