What function can be used to determine if a file is a directory in PHP?
To determine if a file is a directory in PHP, you can use the is_dir() function. This function takes a file path as an argument and returns true if the file is a directory, and false otherwise. By using this function, you can easily check if a file is a directory in your PHP code.
$file_path = 'path/to/your/file';
if (is_dir($file_path)) {
echo 'The file is a directory.';
} else {
echo 'The file is not a directory.';
}