$strcnn=mysql_connect("localhost","root","");mysql_select_db("demodata",$strcnn);$querry="select * from data where id=1";$result=mysql_query($querry);list($id,$filecontent,$filesize,$filename)=mysql_fetch_array($result);header("Content-Length: $filesize");header("Content-Type: application/octet-stream");header("Content-Disposition: attachment; filename=\"$filename\"");echo $filecontent;?>
No comments:
Post a Comment