Re[2]: [PHP] Include file questions
| From: | Richard Davey | Date: | Fri, 25 May 2007 17:13:08 +0000 |
| Subject: | Re[2]: [PHP] Include file questions | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255665@lists.php.net to get a copy of this message | ||
Hi Tijnema,
Friday, May 25, 2007, 5:58:46 PM, you wrote:
> On 5/25/07, Robert Cummings <robert@interjinn.com> wrote:
>> Very. Each directory contains very specific types of code/content.
>> Tracking down where any given function, class, custom tag, behaviour,
>> etc is defined is extremely simple.
>>
>> Cheers,
>> Rob.
> I don't agree with you, i have includes in includes dir inside my
> project, images in images, etc. classes in includes dir start with
> class. configuration files in includes start with config. etc.
Oh to work on such little sized sites again :)
Not that I'm belittling your projects Tijnema, because I'm not - but
I've not worked on a site with a structure that could be that simple
for a long time now, I kinda miss it actually!! Hell even the 'images
folder' had to be split across multiple servers in the code I finished
today.
A lot of Robert's structure makes complete sense. I never keep
libraries inside the webroot that simply don't need to be there.
Infact if a script doesn't output anything 'web related' (image, rss,
html) or process data from the site, it doesn't need to live in the
webroot at all. I use a similar principal for the 'admin' area of the
site too, which I'm sure you'd hate ;) but I always code my admin
areas so that they can run on an entirely different domain name and/or
server if needs be. Only as a last resort do they ever live in /admin,
and never will they share libs that the 'public' site uses, they are
entirely stand-alone entities.
You're right in that it is down to personal preference though :)
Cheers,
Rich
--
Zend Certified Engineer
http://www.corephp.co.uk
"Never trust a computer you can't throw out of a window"