473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

including file and output to browser

I am not sure I understand the rules as to what exactly gets output to a
browser and when. 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.

Thanks,
Mike

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 30 '05 #1
2 1321
>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
Jul 30 '05 #2

"Michael Phipps" <gr********************@optusnet.com.au> wrote in message
news:42***********************@news.optusnet.com.a u...
Why do you ask anyhow? Some code might make it easier to explain why you
are experiencing a particular problem.


Well, my web applications are starting to more like standalone apps because
I have been using OO and the web version of MVC. Each request involves a
number of objects, so to the reader it doesn't look like a single script,
yet it is. Since MVC does such a nice job of separation, the template that
actually gets pushed out to the browser is an 'include' in a method call in
a View/Template class.

Mike

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 30 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: David Johnson | last post by:
I am looking for a way to combine the functionality of "include" and "here documents" so that an included html file containing $variables is expanded and handled (normally printed to stdout). It...
2
by: Sten Westerback | last post by:
Hi I'm considering using .asp to implement a selective inclusion of .htm files containing tables into a HTML code sent to browser from IIS. My question is if it is possible to make an .asp...
2
by: chopper | last post by:
Please excuse the long post but I can't think of shorter way of explaining the issue. Please could someone advise on the following: I'm writing preview functionality for a CMS written in ASP....
2
by: Jeff G. | last post by:
Hello everyone, I have read through the newsgroups (thank God for 'em!) extensively looking for an example of how to pass a file (PDF) from a webresponse stream down to a web client. Here's the...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
11
by: nickyeng | last post by:
I have a html file contains a form asking user to select a choice and press enter to pass the data to server. In server there, i have a cgi script(C language) that accepts the input from browser...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
7
by: Jeff Gaines | last post by:
I have spent the day learning how to use Zend Development Environment. I can now produce a list of files in a directory, filtered by extension, and apparently clickable. Unfortunately clicking on...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.