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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Your php3 file:
// some your php3 code
// another your php3 code

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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!  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.