Member Avatar

i have site divided into about 5 pages , sometime when i make changes then i have to update all five pages.
so i want to know if i make file like template.php and then i divided my pages major portion to parts like header.php, body.php , footer.php and sidebar.php

and then add these all to template.php like include("header.php");include("footer.php"); etc ....

so please tell me that as that method is secure or not i heared somewhere that include(); may get you into trouble .

so please suggest me solution for that better than that will be appreaiated . my pages composed of php , and java codes

Recommended Answers

All 2 Replies

ive seen that technique used a lot indeed, for the exact reason that you only need to modify it once for all 5 pages.

I would say go for it tiger! :)

It's perfectly normal to work that way.
That's one of the main uses of an include file

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.