header

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rod

    header

    Hi,

    a quick question.
    is it possible to send the header to the client only at the end of the page?
    I mean when the build of the page by the PHP server is finished.

    This is because I want to redirect the user to a error.php page each time an
    error occurs.
    But when doing that, I get an error saying that the header has already been
    sent.

    Tanks you very much for your help

    Rodolphe


  • Ian.H [dS]

    #2
    Re: header

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Whilst lounging around on Fri, 11 Jul 2003 14:34:53 +0200, "Rod"
    <toto@toto.co m> amazingly managed to produce the following with their
    Etch-A-Sketch:
    [color=blue]
    > Hi,
    >
    > a quick question.
    > is it possible to send the header to the client only at the end of
    > the page? I mean when the build of the page by the PHP server is
    > finished.
    >
    > This is because I want to redirect the user to a error.php page
    > each time an error occurs.
    > But when doing that, I get an error saying that the header has
    > already been sent.
    >
    > Tanks you very much for your help
    >
    > Rodolphe
    >[/color]


    You could use a buffer (ob_start()) or you could do it properly so
    that headers don't _need_ to be sent after HTML output (ie: correct
    error checking previous to this stage).

    </2p worth>



    Regards,

    Ian

    -----BEGIN PGP SIGNATURE-----
    Version: PGP 8.0

    iQA/AwUBPw6ww2fqtj2 51CDhEQKxdACcDb ViBJE1EY+uRdHU1 +p0bVzNjKsAoIfK
    H3u5yyPmgOlKxot hHHCnkzFh
    =egrO
    -----END PGP SIGNATURE-----

    --
    Ian.H [Design & Development]
    digiServ Network - Web solutions
    www.digiserv.net | irc.digiserv.ne t | forum.digiserv. net
    Programming, Web design, development & hosting.

    Comment

    Working...