How to raise File Download box in WindowsCE client
From: Pedro Fonseca (nospam_at_pedrofonseca.com)
Date: 05/31/04
- Next message: Pedro Graca: "Re: Interesting Discussion with my PHP Teacher"
- Previous message: Garp: "Re: Interesting Discussion with my PHP Teacher"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 May 2004 03:27:34 -0700
Greetings!
In my PHP website I'm trying to raise a File Download dialog directly
in a WindowsCE IE client with the following code:
header( "Content-Type: application/octet-stream\n" );
header( "Content-Disposition: attachment; filename=\"$file\"\n" );
header( "Content-Transfer-Encoding: binary\n" );
header( "Content-Length: " . filesize($path.$file) . "\n" );
The dialog does appear, but instead of prompting the user to save a
something.zip filename (for instance) it prompts him to save a file
called script.php (the name of the script that has this code). This is
very strange, since I know that this code is the cookbook approach to
do this, and it works perfectly in all PC browsers that I know of. It
seems that WindowsCE IE completely ignores the filename attribute in
the Content-Disposition HTTP header... :-(
I've been suggested to feed the link directly to the client, through
header("Location: ..."). I did try that, but instead of a dialog, the
client browser just displays the binary file in the HTML page...
Is there a PHP workaround to using the Content-Disposition headers
approach with WindowsCE? And using header("Location: ...") how do I
stop the client WindowsCE browser from displaying garbage binary data
and prompt him to save the file instead?
Sorry if this thread belongs in a more specific WindowsCE newsgroup. I
just thought that, since I'm using PHP, that any PHP user here could
have developed for the WindowsCE before and stumbled on the same
problem...
Thanks!
Best regards!
- Next message: Pedro Graca: "Re: Interesting Discussion with my PHP Teacher"
- Previous message: Garp: "Re: Interesting Discussion with my PHP Teacher"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|