$file = 'image.jpg';
$obj =
header
($
file
);
if(
isset
($obj["mime"])) {
header
('Content-Type:'.$obj["mime"]);
} else {
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
}
header
('Expires: 0');
header
('Pragma: public');
header
('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header
('
Content-Disposition: inline; filename="some name.jpg" ');
header
('Content-Length: ' . filesize($file));
readfile
($file);
exit;
It is nice post and I found some interesting information on this blog, keep it up. Thanks for sharing. . .
ReplyDeleteYii Framework Development Company in India