corecodeschool.blogspot.com: How to download multiple file using php code

Enter Keyword Hear for Search This Blog

Wednesday, 7 March 2018

How to download multiple file using php code

Download Multiple File in PHP


<?php


extract($_GET);

$link=mysql_connect("localhost","root","");

mysql_select_db("converter",$link);

$query="select * from multiple where id=$id";

$res=mysql_query($query,$link);

while($row=mysql_fetch_assoc($res))


$getfile=$row['PdfFilename'];

header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.$getfile);
header('Content-Transfer-Encoding: binary');

$file = @ fopen($getfile, 'rb') or die("Techincal Error");    

fpassthru($file);
        
?>

No comments:

Featured post

Contact

Contact Core Code School Core Code School shares beginner-friendly tutorials on PHP, HTML, CSS, JavaScript, Java, SQL and Ubuntu. You can...