Yes. Take your
website and
break it into 3
common pieces
for example: #
Header #
Sidebar #
Footer
This is the
code that is
the same for
every page.
Then you create
a file for your
pages, and
include the
header, sidebar
and footer.
So an example,
index.php could
be: Code:
<?
include('../pa
th/to/HEADER.ph
p');
include('../pa
th/to/SIDEBAR.p
hp');
//content
specific to
index.php - bla
bla bla
include('../pa
th/to/FOOTER.ph
p');
?>
This
would be how
all of your
pages are.
Then, when you
make a change
to any of the 3
files, it
applies to all
of your pages,
and you don't
have to make
that change in
every single
file.
Also, you
should work
towards making
your website
dynamic, where
the content is
generated via
database. Then,
you have
technically
very few files
of your
website, but
each file may
be capable of
generating an
unlimited
number of
pages. For
instance, I
have one file
that I created
that will
display an
article from
the database. I
don't have a
PHP/HTML file
constructed for
each one. The
page just reads
information
passed to it to
obtain the
appropriate
article and
page.
|