Welcome Guest, Not a member yet? Register   Sign In
forc_download() at a wite space at the begining of file content
#1

[eluser]Amir Bukhari[/eluser]
Code:
$file = $media->filepath;
$data = file_get_contents(SITE_BASE.$file);
            
force_download("media_file_$id.rm", $data);

the file got download correctly and it is a RM file.

but real player can not open it. then i figured there is a white space at the begining of the file, which is not part of the content. after removing the that white space realplayer can play the file.

if any of PHP file include a white space then header() function should complain about it.

any help?




Theme © iAndrew 2016 - Forum software by © MyBB