Hello, (I'm sorry but I don't know your name), well you were right about 
saying that I'm re-sending headers, I didn't notice it before. I'm using 
the Wordpress engine, follows a bigger segment of code:

<?php
if (isset($_GET['download']) && ($_GET['download'] >= 1)) {
    if ($_GET['download'] == 1)
        header('Content-type: application/doc');
    else if ($_GET['download'] == 2)
        header('Content-type: application/rtf');
    else if ($_GET['download'] == 3)
        header('Content-type: application/pdf');
    header('Content-Disposition: attachment; filename="' . $_GET['file'] 
. '"');
    readfile($_GET['file']);
}

require('../../../../../wp-blog-header.php');
get_header();
?>

These are the first lines of my code, unfortunatelly I can't avoid the 
use of "require('../../../../../wp-blog-header.php');" and 
"get_header();", otherwise the engine wouldn't work, so the problem 
persists.
Do you know any other way to open the dialog box "Open/save"?

Thanx, morten.

[EMAIL PROTECTED] escreveu:
>
> ----- Original Message -----
> From: "morten"
>
> Hello to everyone, I'm new to this group, and I've been facing a
> problem I couldn't solve, I don't know how to serch for it in the
> list's old messages, so I'll tell you what it is and see if you can
> help me.
> <snip>
> *** the content of the page I'm in is "attached" to the end of the 
> file I'm
> downloading. ***
> -----------------------------------
> Hello morton,
> You say "the content of the page I'm in is "attached" to
> the end of the file I'm downloading" and I don't understand why this 
> should
> be happening.
>
> It sounds like you are trying to re-send headers and this is not 
> possible.
> Perhaps you have white space sent first.
>
> Headers can only be sent BEFORE the page itself even if it is only a 
> single
> space that is sent to the browser.
>
> ie -
> **** the file starts on the next line
> <?php ?>
> <?php header("blah");
>
> **** the file starts on the next line
>
> <?php header("blah");
>
> **** the file starts on the next line
> <html>
> <head>
> <?php header("blah");
>

Reply via email to