test if register_globals is disabled by poiting the $filetodownload to the actual file u intend to download.

Oj.

The optimist sees the doughnut; the pessimist the hole.


--- On Tue, 6/2/09, James Gutu <jmgutu@gmail.com> wrote:

From: James Gutu <jmgutu@gmail.com>
Subject: [Skunkworks] Anyone with similar problems? (PHP Header)
To: "Skunkworks forum" <skunkworks@lists.my.co.ke>
Date: Tuesday, June 2, 2009, 12:43 PM

Hi guys and gals.

Having a problem with access kenya hosting services (again).

I have this script that automatically downloads a PDF file when a link is clicked.

It works on all my testing servers but not on Access Kenya's.

Please find the script below:

<?php

$filetodownload = $_GET['filedownload'];

header('Content-type: application/pdf');

header('Content-Disposition: attachment; filename='.$filetodownload);

readfile($filetodownload);
?>

Script is simple enough. Any work around apart from pointing the script to another server that can handle? 

Or anyone from Access Kenya who can explain this?


Regards,
.jmg

-----Inline Attachment Follows-----