in the http headers the " charachter would ruin the file name ... also you can't escape it this is why I need this to make sure that if this charachter exist it wouldn't ruin the header

---------- Forwarded message ----------
From: Ammar Ibrahim <[EMAIL PROTECTED]>
Date: Jun 29, 2006 4:30 AM
Subject: [JoPHP] Re: Download Script and IE
To: [email protected]

Why do you have this line?

$filename = str_replace("\"","",str_replace("\'","",$file));

Ammar


On 6/25/06, Ala'a Ibrahim <[EMAIL PROTECTED]> wrote:
Dear Group,
I have a question regarding a download script on and running it on IE
the script goes like this
<?php
if(ini_get('zlib.output_compression'))
  ini_set('zlib.output_compression', 'Off');
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-type: $mime");
$filename = str_replace("\"","",str_replace("\'","",$file));
header("Content-Disposition: attachment; filename=\"" . $filename . "\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: $size");

//readthe file and print it
?>

in Firefox (God Bless Firefox), and opera, and ..... all the browsers except IE when you select to open the file instead of saving it, it works just fine, but when it comes to IE, I always get the error of the file couldn't be found after the download, I've googled it with nobody giving a good answer, So I'm totaly lost.
So anybody could figure out what is going on with this stupid browser

--
                                 Ala'a A. Ibrahim
http://www.alaa-ibrahim.info/






--
                                 Ala'a A. Ibrahim
http://www.alaa-ibrahim.info/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Jordan PHP Users Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/JoPHP
http://Jolug.org/
-~----------~----~----~----~------~----~------~--~---

Reply via email to