Re: Using a single php entry file for a whole site. [message #181861 is a reply to message #181854] |
Thu, 20 June 2013 18:23 |
Stefan+Usenet
Messages: 3 Registered: June 2013
Karma:
|
Junior Member |
|
|
On Thu, 20 Jun 2013 19:22:18 The Natural Philosopher wrote:
> ALL request to a site are redirected by apache rules to one single file.
> Let's call it index.php. Index.php notes the URL the user wants and looks
> it up in a database, and if it exists, includes() the actual PHP file
> for that page.
[...]
> Is this possible, and if so what if any are the downsides?
Definitely, yes. I do it quite similar with the only difference that I
do not include() the desired page, but rather each page is a class derived
of an abstract parent class. This opens some nice possibilities to define
page title, access rights and things like that and it makes it possible
to construct an object hierarchy with similar pages grouped together.
Stefan
--
http://kontaktinser.at/ - die kostenlose Kontaktboerse fuer Oesterreich
Offizieller Erstbesucher(TM) von mmeike
Worauf man sich verlassen kann - Stefan: riechen, welch eifriges Erwarten!
(Sloganizer)
|
|
|