error in download a file from mysql

oppisIvette

New Member
helloi have tryed a lot of source codes for this but i have the same error in all of them\[code\]include 'functii.php';starts();opendb();$query = "SELECT content,`title_real`,`size`,`ext` FROM file WHERE file_id = '3'";$result = mysql_query($query) or die('Error, query failed');list($content,$filename,$size,$ext) = mysql_fetch_array($result);header("Content-Type: application/force-download");header("Content-Type: application/octet-stream");header("Content-Type: application/download");header("Content-Disposition: attachment; filename=$filename.$ext");header("Content-Transfer-Encoding: binary");header("Content-Length: ".$size);echo $content;exit; \[/code\]the problem is that in the downloaded file i have a lot of "\0" that came from nowhere.the file is well stored in the database. i tested that.thank you
 
Back
Top