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);
?>
<?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:
Post a Comment