How can different browsers handle file size transmission in PHP?

Different browsers can handle file size transmission differently due to various factors like server settings, browser configurations, and network limitations. To ensure consistent file size transmission in PHP, you can use the `Content-Length` header to specify the size of the file being transmitted. This header informs the browser about the size of the file, allowing it to handle the transmission accurately.

// Set the content length header to specify the size of the file
$fileSize = filesize('example.txt');
header('Content-Length: ' . $fileSize);

// Output the file content
readfile('example.txt');