Re: Web Site Directory Layout
| From: | Ashley Sheridan | Date: | Sat, 26 Sep 2009 08:38:26 +0000 |
| Subject: | Re: Web Site Directory Layout | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-298362@lists.php.net to get a copy of this message | ||
On Fri, 2009-09-25 at 22:26 -0400, Robert Cummings wrote:
> Caner Bulut wrote:
> > Hi All,
> >
> > Is there a stable or standart directory layout for PHP project (like web
> > sites)?.
> >
> > Example;
> >
> > index.php
> > img/
> > css/
> > js/
> > lib/
> > doc/
> > tools/
> >
> > Thanks.
>
> There's no standard. My advice is to use easily identifiable names. The
> above are quite obbvious. My own preference though is to not shorten
> names. For instance, I would use the following in place of what you have
> provided as examples:
>
> index.php
> images/
> css/
> javascript/
> lib/
> documents/
> tools/
>
> That's just personal preference though :)
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
I tend to usually go with the following, using what fits with the
project:
index.php
styles/
images/
scripts/
includes/
sometimes I might add directories where it makes sense to, other times
I'll compartmentalise the existing directories further. There's not any
standard, but I think if you yourself decide on some sort of convention
you will use that makes sense to you, it makes things a lot easier in
the long run.
Thanks,
Ash
http://www.ashleysheridan.co.uk