|
Posted by jodleren on 03/27/07 19:32
Hi!
I talked about this some time ago somewhere else, now I am working
with this again...
I want to offer the user to save/open a file, instead of the browser
opening it by itself (as e.g. a jpeg picture would).
Looking into the advices I got at the time, I came up with this:
<?php
$filename=ExtractFileName($file); // my own function included here
header('Content-type: application/octet-stream');
header("Content-Disposition: attachment; filename=\"$filename\"");
readfile($file);
?>
It works, I get the dialog, but the white window remain.
What options do I have of closing the window, so I only have the
dialog?
My email at www.hot.ee has that option, some odd link (/attn/hex-code-
here ) which behaves as I'd like mine too.
What would people around here do?
BR
Sonnich
Navigation:
[Reply to this message]
|