Including html document in php file

I am creating a web page which would be generated dynamically with the help of php. Within this file I want to show the contents (text only) of another file stored as an html file. I would like to know how would I be able
to open this  html file and show its content in a php generated web page using PHP.

The html text may be long containing about 100 - 500 lines.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

maxkirConnect With a Mentor Commented:
Your php3 file:
// some your php3 code
// another your php3 code
Or if your include file contains only HTML (no PHP):

// some your php3_code
// another your php3 code
If your file is already formated in the way you want it posted to the browser the above require command would work, or you could use the include command which has basicly the same syntax:


When PHP includes your file it is treated as an html file unless tags are present in the included file that would indicate otherwise.

Also if you have common components that are displayed on each page - ie your banner, navigation items, and footers - it is easier to include these as seperate files or write them as functions to be included in a common functions file that can be included with every page.

If you have a table layout for the main display area of you page you might consider making a function where you could pass the names of the files for each section of the page instead of have to create the whole page just to have PHP redisplay it for you.
I am confused by this questions grade.  Why did the guy get a 'B'.  It is the perfect answer all be it not so tuff!  
All Courses

From novice to tech pro — start learning today.