This is a simplified version of how I manage this task.
Code: Select all
$file = $_GET['file'];
$filename = end(explode('/',$file));
header("Content-Type: $conType");
header("Content-Disposition: inline; filename=\"".basename($filename)."\"");
readfile($file);
Anyways, this is a pretty standard way of serving files using php as far as I know. It works great too! In Firefox..... no surprise here, it doesn't work in IE!? Well i shouldn't say it doesn't work. PDF's seem to work fine. Its really just images that don't seem to work.
So I've tried a bunch of other methods of performing the same basic task, and I just can't seem to get IE to recognize that file.php is returning an image.
If the file is an image show it like so: <img src="thepathto/file.php?file=thepathto/someImg.jpg" />
for pdf's and other app files I use embed.
If anyone could help me get this working in IE I would be very grateful!
Thanks!