Hi,

> The problem is that I can never get the html stuff output *after*
> having  included "download.inc" because of the "exit;" call -- which I
> have to have  else the html gets output and downloaded as well (and I
> don't understand why  fpassthru doesn't stop at EOF on $fp).
[...]
> downloadtxt.inc:
> <?php
>  create a txt file, and then:
>  header( "Content-Transfer-Encoding: base64" );
>  ... more header stuff
>  $fp = fopen( "$txtfile", "r" );
>  fpassthru( $fp );
>   exit;
> ?>

Replace "exit;" with "fclose( $fp );". Please note that headers must be
sent before any other output.

What you are trying to achieve can be done with refresh headers (either
html-meta or http).

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative Ltd



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to