Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
Please excuse me if this is the wrong category (this is my first post on here).
I have just started getting into PHP and have bought a few books to learn about creating database driven websites. However, i can't seem to find out the best way to structure the actual folders on my server when using includes.
Could anyone offer any advice?
I've noticed on a few sites people appear to use a folder for each page (or at least this is what it looks like to my untrained eye):
Where each of those urls probably doesn't relate to a real folder on the file system, but relates to a model name (which is probably the name of a table on the database).
Those are most likely just url beautification and not actual folders. This can be achieved using two methods: url rewriting at the server level (apache has mod_rewrite) or parsing at the script level (here is a nice tutorial for url beautification in PHP).
It all depends on the type of site your make, or should i say the size.
If you have a small site (up to 50 pages) that you want people to find on google, try and keep all the files in the root with excetion to images, css, pdf's and other such files which should be in sub folders. Google doesn't like drilling to far down sub folders.
if you have a bigger site, it's difficult to manage sites using just the root directory. so i would only recommend only going up to 2 sub directories deep.