[thelist] PHP, PDF and IE7

Xiaosong Li xli at unitec.ac.nz
Mon Mar 12 17:31:55 CDT 2007


Thanks, that's very helpful.

Dr. Xiaosong Li
Lecturer
School of Computing & Information Technology
Unitec New Zealand
Phone + 64 9  815 4321 x 6019
Fax + 64 9 815 4338
Room 3003, Building 183

>>> Hershel Robinson <hershel at galleryrobinson.com> 03/13/07 3:41 a.m.
>>>
This PHP code:

if ($fp = fopen($filename, 'rb')) {
$len = filesize($filename);
header('Content-Title: Mishpacha PDF Article');
header('Content-Type: Mishpacha PDF Article application/pdf');
header("Content-Length: $len");
fpassthru($fp);
fclose($fp);
} else {
echo 'Invalid File?<br>';
echo $file[filename];
}

works to deliver a PDF in FF2 and IE6. In IE7, however, Windows XP 
doesn't seem to realize that it's a PDF file.

The code is online here:

http://mishpacha.com/pdfrequest/1/149/40/

You need only to enter an email and then submit.

Any ideas?

Thanks,
Hershel

-- 
Web Site Construction by Gallery Robinson
http://galleryrobinson.com/ 
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/ 

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 



More information about the thelist mailing list