Here is the code that downloads the file to the user from the server from the "/ tmp" directory under the name "file.txt"
<?php if (isset($_GET['file'])) { $file = $_GET['file']; if (file_exists($file) && is_readable($file)) { header("Content-Disposition: attachment; filename=\"$file\""); readfile($file); } } else { header("HTTP/1.0 404 Not Found"); echo "<h1>Error 404: File Not Found: <br /><em>$file</em></h1>"; } ?> When downloading in different browsers, the name of the following character goes out, either "tmp_file.txt" or "tmp-file.txt"
Please tell me where is the reason?
What does this suffix "tmp _", "tmp-" add?
And why in different browsers different names on the output are obtained?
readfile($file)function - webDev_