Hello everybody..
i am back with some questions..
i am trying to develop my own php coding format..
For example:
db>dbConfig.php (db configuration file)
>db.class.php (db handlining functions)
images> here goes the static images..
pics >here goes the dynamic images ie uploaded etc..
js > here goes the .js files
css > here goes the .css files
etc etc..
and there may be different classes, libraries....
I want to develop a totally complete OO coding format (somewhat near to MVC), for example writing different class for mail handling,
error handling, session hanlding, file handling
for that i need help of yours...
Lets share our coding format over here so that a newbie can get
a bit idea to develop the effiecent and effective one...
thanks in advance to all of you
a good php coding format ???
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
for css, I've often stored everything in:
/styles/<stylename>/index.css <and other relative css includes>
/styles/<stylename>/images/<css images here>
I've often had one ./images directory per directory (when there are actual directories)
/js/jQuery.js
/js/<module or app>/<files>.js
For a while I used an /inc folder for all my includes. I've also used /.inc but had trouble with certain ftp programs / seeing the directory (big PITA factor).
These days I'm mostly using:
somewhere outside doc_root:
/m/<model-name>/
/v/<view-name>/ (xsl files)
/c/<controller-name>/
/data/<md5-of-file> (data storage)
/cache/ (filesystem cache of some DB objects)
inside doc_root
/css/<theme>/.... (same as styles above)
/js/.... (same as js above)
/index.php (front controller)
/styles/<stylename>/index.css <and other relative css includes>
/styles/<stylename>/images/<css images here>
I've often had one ./images directory per directory (when there are actual directories)
/js/jQuery.js
/js/<module or app>/<files>.js
For a while I used an /inc folder for all my includes. I've also used /.inc but had trouble with certain ftp programs / seeing the directory (big PITA factor).
These days I'm mostly using:
somewhere outside doc_root:
/m/<model-name>/
/v/<view-name>/ (xsl files)
/c/<controller-name>/
/data/<md5-of-file> (data storage)
/cache/ (filesystem cache of some DB objects)
inside doc_root
/css/<theme>/.... (same as styles above)
/js/.... (same as js above)
/index.php (front controller)