Re: including file and output to browser
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: including file and output to browser

From: Michael Phipps <gravityspike_spamfree_@optusnet.com.au>
Date: Sat Jul 30 2005 - 07:09:11 CEST

>I am not sure I understand the rules as to what exactly gets output to a
>browser and when.

To make things easier, lets assume you aren't using output buffering.

a PHP file gets read top to bottom.

If while reading one PHP file the parser comes across an included file, that
file will be read top to bottom and then continue from where it left off in
the original script.

> If I include a text only file or an html file, these will show up in the
> browser regardless of where in the script they are included.

They will be output to the browser at whatever point you put them in the
script.

Why do you ask anyhow? Some code might make it easier to explain why you
are experiencing a particular problem.

Michael
Received on Tue Oct 18 02:06:13 2005