What is the function in PHP to retrieve the size of a file without using FTP?

To retrieve the size of a file in PHP without using FTP, you can use the `filesize()` function. This function takes the file path as an argument and returns the size of the file in bytes. By using this function, you can easily get the size of a file on the server without the need for FTP access.

$file_path = 'path/to/your/file.txt';
$file_size = filesize($file_path);

echo "The size of the file is: " . $file_size . " bytes";