PHP files treated indivdually, or included?
Posted: Sun Apr 11, 2004 12:30 am
This sort of goes along with a post I just had, but I wanted to hear some opinions on something specific.
I can either have each one of my pages like this :
which would mean true paths (in links) to all my files... or I could use a variable, and just pass index.php the file I want.. and use this:
where x is like this: index.php?x=whatever
Any thoughts? I can't really think of any advantages/disadvantages either way.. but I am very new to PHP. Thanks.
I can either have each one of my pages like this :
Code: Select all
<?php require_once 'header.php'; ?>
<p>this is the content in index.php</p>
<?php require_once 'footer.php'; ?>Code: Select all
<?php require_once 'header.php'; ?>
<?php require_once '$x.php'; ?>
<?php require_once 'footer.php'; ?>Any thoughts? I can't really think of any advantages/disadvantages either way.. but I am very new to PHP. Thanks.