|
Posted by Jivanmukta on January 3, 2009, 9:46 am
Please log in for more thread options
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
show/hide quoted text
website users, .php scripts called by <form>s, file styles.css.
./images: PNG, GIF and JPEG images.
show/hide quoted text
./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.
|
|
Posted by Jerry Stuckle on January 3, 2009, 11:23 am
Please log in for more thread options
Jivanmukta wrote:
show/hide quoted text
> 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
==================
|
|
Posted by Willem Bogaerts on January 5, 2009, 3:56 am
Please log in for more thread options show/hide quoted text
> 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.
Maybe this is of interest:
http://www.howtoforge.com/set-up-a-modular-svn-repository-for-php-websites
As Jerry said, keep everything that does not need to called from a
browser outside the web root. Especially sensitive files like files
containing passwords.
Best regards,
--
Willem Bogaerts
Application smith
Kratz B.V.
http://www.kratz.nl/
|
| Similar Threads | Posted | | Pear directory structure... | August 3, 2006, 3:16 pm |
| Creating a directory structure | July 8, 2008, 6:41 am |
| What is a good Directory structure for homegrown MVC applications? | December 2, 2005, 8:15 am |
| Dynamic pages without with directory structure instead of parameters | September 8, 2006, 5:08 pm |
| Directory / File Indexing - Structure Question | October 15, 2007, 8:07 am |
| project directory tree/structure your favorite? | December 10, 2007, 6:25 pm |
| Create menu dynamically from directory structure | September 14, 2009, 9:17 pm |
| Directory website | January 29, 2010, 9:28 am |
| Want Open Source Code of a Website made in PHP for Updation of my Website | October 2, 2005, 9:32 pm |
| Recursive delete of directory - Directory not empty error | April 14, 2008, 12:14 pm |
|