|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-08-26 08:56 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 22:00:01 2025 UTC |
Description: ------------ Hi, I think know a bug in php, i have an file in folder (/home/user/file/file.ext), when i try download (with my script), the php insert a "\n" at start of the file. I try to remove the \n, dont resolve the problem. I'm sorry for my bad english. If this is not bug ... sorry ... i try find a solution in the google but not happen. Reproduce code: --------------- header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: $ctype"); header("Content-Disposition: attachment; filename=\"".$nm_layout."\";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".$tm_layout); set_time_limit(0); readerfile($bn_layout); /* the variables have a value, the download is finished and all the content of the file is correct, but the "\n" broken the file */ Expected result: ---------------- Correct file content Actual result: -------------- Correct file content but with "\n" at start.