rules for the name of subfolders?

Is there a rule for the subfolder name?

I named my subfolder as "business_links".

CI has the rule for the variable names, for the class names etc. How about subfolder name?

Is there a rule or "best practice" in naming the subfolder?


There's nothing mentioned in the style guide on folder names, so you should be ok
The only think I would make sure to do (which you've done in this example) is all lower case, with underscores for word seperators
That's the most consistent method from what I've seen

How about the file name?

Say I have a class

class Article_categories extends Controller {

The file name for this class in the controllers



It make sense to use

But I always trying to avoid underscore "_" if this file name will be in the url before. Should I still stick with this rule or not necessary?

In simple words, for the file name that will be in the url, do we use underscore or not.


The above is what I would suggest.

Why do you not use the "_" in urls? It is better than doing spaces and it helps break up the urls so it isn't a huge string of text.



It is an very old habit, I was trying to avoid "_" in url. In the old time, some not computer oriented people may think there is a space there instead of "_", if they type in the url in case, they got error. But I think there will be no such people left now or if there are, they are not our target clients anyway.

Yes. I will use "_" in the url from now on.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.