|
Posted by Jerry Stuckle on January 3, 2009, 11:23 am
Please log in for more thread options
Jivanmukta wrote:
> Hello,
> I am learning HTML/JacaScript/CSS/PHP5/MySQL/XML from books and WWW.
> I am creatinga website using these technologies.
> I would like to ask experienced PHP programmer how to design structure of
> subfolders. Here's what I made:
>
> .: Main directory containg index.php page, other web pages accessible by
> website users, .php scripts called by <form>s, file styles.css.
> ./images: PNG, GIF and JPEG images.
> ./include: JavaScript <link>ed files of utility functions, .inc.php
> includes, config.inc.php (website configuration file).
> ./secure: Web pages accessible through SSL, .htaccess and .htpass files,
> protected .php scripts with some .inc.php includes, website log file.
> ./secure/backups: Backups of database and backups of website log.
>
> What do you think of my idea?
> Of course more complex website would consist of more complicated structure
> of larger number of folders.
>
I put included files (especially ones with passwords, configuration
info, etc.) outside of the website's root directory. That way it cannot
be downloaded, even if there is a glitch in the web server. I also
don't have a special directory just for secure pages. I do, typically,
have at least one images directory (more if there are lots of images, of
which some are special purpose.
And I keep backups off site.
Other than that, it's whatever works for you. But I try to keep the
directories related to the web structure, i.e. if I have a general
products page which links to "doodads", "gadgets" and "widgets", each of
which links to more pages, I might have something like (assuming
products is in the root) /doodads, /gadgets and /widgets.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|