开发者

Number of files for a Website [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

i just want to ask what is the number of files we are supposed to create for a website? (Subjective)

I mean, you need 1 file (html) for each redirection (page) .. and 1 file for each manipulation to do (php) --> it de开发者_StackOverflowpends... 1 file for css .. etc

My way of thinking is right? ... or my architecture is not really what it suppose to be?

Thanks to answer (Subjective..evidently:D)

P.S. : I ask that because i really have a bunch of files in a project (around 40) :S...


It really depends on your programming style. Some people have a page per function / section. With php you could build everything in theory into one page.

It's a balance between too large files, complicated over scripting from using one file too often and seperating everything out too much into too many files.

I would suggest 1 file per grouped idea of a website. Use folders to group things better and it will look cleaner and be easier to navigate.

In general. 1 css file for a small to medium site. More once you need to seperate things out for clarity.

Each php file should deal with 1 area of a website like login etc

HTML I would say 1 file per section of your site.

As you said though it's a very subjective topic with no right or wrong answer. Find the best method for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜