Re: Simple question!!!

From: Date: Fri, 02 Mar 2001 11:07:09 +0000
Subject: Re: Simple question!!!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42331@lists.php.net to get a copy of this message
In article <3A9F7BDA.9C43A6A6@memosis.pt>, ricardo@memosis.pt (Ricardo D'Aguiar) wrote: > Imagine the following script: > > <HTML> > <TITLE>Some Title</TITLE> > <BODY> > <?php > $var = 1; > if ($var == 1) { > die ("I'm dead"); > } > echo "I'm alive"; > ?> > </BODY> > </HTML> > > If I try to execute via Internet Explorer ("5.x") apparently every thing > works fine. > It shows the string "I'm dead". > > But if I use the Netscape 4.7x, I get a blank screen. > When I view the Source Code ("HTML code in Netscape") it shows: > > <HTML> > <TITLE>Some Title</TITLE> > <BODY> > I'm dead > > Netscape can't render the page if its missing the </BODY> and </HTML> > tags in the end. > I already used 'return' end 'exit' functions but with the same result. > > There is some configuration parameter to the PHP server to send the rest > of HTML code after exit the script or workaround? Is it an option to just move the code below the </html> tag? Another option would be to echo the closing tags from within the conditional, prior to calling the die(). I believe output buffering can also be used to achieve what you want, but someone else will have to explain how (whether?) that can be done here. -- CC

« previous php.general (#42331) next »