I had first tried a less active PHP group, but let me try here.
I searched for this, but didn't find anything that appeared related.
Possibly I didn't know what to search for.
I am designing a web application using PHP, to which I am relatively
new. I have seen some sites use the model whereby a single index page
is created that handles authentication and receives option parameters
telling the index what to load in the body of the page. For example,
one could pass $page=AccountIn dex.php to tell the index to include the
account index page using:
require_once $page;
And the link to get there would look like:
<a href="<?=$_SERV ER['PHP_SELF']?>?page=Account Index.php">Acco unt
Index</a>
Alternatively, the link could actually refer to a different page
(e.g., <a href="./AccountIndex.ph p">Account Index</a>) and that could
be loaded using its own authentication and receive its own parameters.
I hope this is sufficiently clear.
The questions are:
Can anyone provide opinions on advantages/disadvantages to each of
these models?
Can anyone provide the correct terminology to discuss these ideas so
that I can look for more, relevant resources.
Thank you,
Mike
I searched for this, but didn't find anything that appeared related.
Possibly I didn't know what to search for.
I am designing a web application using PHP, to which I am relatively
new. I have seen some sites use the model whereby a single index page
is created that handles authentication and receives option parameters
telling the index what to load in the body of the page. For example,
one could pass $page=AccountIn dex.php to tell the index to include the
account index page using:
require_once $page;
And the link to get there would look like:
<a href="<?=$_SERV ER['PHP_SELF']?>?page=Account Index.php">Acco unt
Index</a>
Alternatively, the link could actually refer to a different page
(e.g., <a href="./AccountIndex.ph p">Account Index</a>) and that could
be loaded using its own authentication and receive its own parameters.
I hope this is sufficiently clear.
The questions are:
Can anyone provide opinions on advantages/disadvantages to each of
these models?
Can anyone provide the correct terminology to discuss these ideas so
that I can look for more, relevant resources.
Thank you,
Mike
Comment