Page 1 of 1

Evaluate my sytem

Posted: Wed Nov 23, 2005 10:34 pm
by harrisonad
Hi, I created a system for the company website that uses quesry strings to determine the page requested.

An example is:
http://www.mydomain.com?section=music&page=albums

With this query string, the system looks for somefile named as 'music_albums.php' inside a certain folder, such as 'scripts/'.
The script has a single function named 'getContent()' that return the str of contents. The string is then incorporated to page as it's content.

But, I observed that many of the site uses many 'index.php' file inside folders that are named as the site sections.

So they could have used a url like this:
http://www.mydomain.com/music/albums/index.php

Is there something unprofessional with the system i created?
I need some evaluations here.
Thanks in advance.

Posted: Wed Nov 23, 2005 11:14 pm
by josh
As long as you are careful to not accidently include the wrong file it's fine. You can make your query look like hardcoded folders using mod_rewrite (an apache module). Personally I don't see any reason for including files off the filesystem, I write a template class and call it from my files, which is the other way around from what you're doing. Another option is store your content in blob fields in mysql