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=\"$fil e\"\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("Locatio n: ..."). 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("Locatio n: ...") 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!
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=\"$fil e\"\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("Locatio n: ..."). 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("Locatio n: ...") 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!
Comment