Jump to content

Planning a php site


draco2317

Recommended Posts

Sorry for any confusion.  Basically, what i mean is, for example lets say i am starting a website like one model place, I want to know about planning the code, files, and folders.  I guess what I am trying to says so i am not just sitting at the computer typing random pieces of code, which might work, but would be difficult to maintain, repair, or upgrade.  Im looking at how to plan the code files and folders to its clean and effinecent. Also is there such a thing as commenting too much?
Link to comment
https://forums.phpfreaks.com/topic/17091-planning-a-php-site/#findComment-72217
Share on other sites

Commenting too much? There's no such thing as you'll find out when you want to modify a piece of code that's six months old  ???

I normally have an organization like this for the root folder:

index.php
robot.txt
.htaccess
... and other files ..

then folders ...
/admin - protected folder for anything to deal with database editing etc.
/includes - for top of page/bottom of page with my 'template'
/support - for CSS files, db-conn file, etc.
/images/core - for images NOT related to content
/images/content - for images related to content
Link to comment
https://forums.phpfreaks.com/topic/17091-planning-a-php-site/#findComment-72222
Share on other sites

[quote]how to plan the code files and folders to its clean and effinecent[/quote]

This is something that is very subjective...what is "clean and efficient" to me, may not be to you.  Generally, I tell people who work for me to do what is logical to them, and just make sure to document everything clearly, which leads me to your second question...

[quote]is there such a thing as commenting too much?[/quote]

If at any point in the future there is the slightest possibility that someone else that may be less proficient will have to maintain your code, then -- generally -- no, you can not comment to much.  You can always go overboard with anything, just keep it reasonable.  When I code, I usually only comment blocks of code so  in the future I can come back and look through the code and remember what I'm doing.  I don't need to comment each and every line and function that I'm doing...for me or for anyone else that I work with, but that may not always be true.
Link to comment
https://forums.phpfreaks.com/topic/17091-planning-a-php-site/#findComment-72224
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.