Re: page reloading

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: page reloading
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95696@lists.php.net to get a copy of this message
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 [dhardiker@staff.firstcreative.net] ADAM Software & Systems Engineer First Creative Ltd

« previous php.general (#95696) next »