Website directory structure specification discussion

zhaozj2021-02-16  88

The directory of the website refers to the directory created when you build a website. For example, the root directory and I mats subdirectory are established by default when establishing a website with FrontPage. The structure of the directory is an easy ignore problem, and most administrators are unplanned to create a subdirectory. The directory structure is good, there is nothing to feel on the viewer, but for the upload maintenance of the site itself, the future expansion and transplant have an important impact. Below is some suggestions for establishing a directory structure. Don't store all files in the root directory, some netizens are placed in the root directory for convenience. This is easy to cause file management confusion. You often can't figure out which files need to be edited and updated, which useless files can be deleted, which are associated files, affecting work efficiency. Also affect the upload speed. Server generally creates a file index for the root directory. When you put all the files in the root directory, then even if you only upload a file, the server also needs to retrieve all the files again and create a new index file. Obviously, the greater the amount of the file, the longer the waiting time will be. So, give you the recommendation: minimize the number of files stored in the root directory. The establishment of subdirectory subdirectory is established according to the contents of the column. For example, the web tutorial site can establish a corresponding directory according to the technical category, like Flash, DHTML, JavaScript, etc .; enterprise sites can be established according to company profiles, product introductions, prices, online orders, feedback contacts, etc. Other secondary columns, similar to what'snew, more friendships, requires a separate subdirectory that can be updated frequently. Some relevance is strong, there is no need to update the column, for example: About this site, about webmaster, site experience, etc. can be merged in a unified directory. All programs are generally stored in a specific directory, such as the CGI program placed in the CGI-bin directory. Easier maintenance management. All the content you need to download is also best placed in a directory. Create a separate images directory in each home directory usually has an images directory under a site root directory. When you first start learning the home page, Alie habits are stored all images in this directory. But later discovered that it is quite troublesome when I need to pack a master bar for download, or to delete a column. After practical discovery: Establishing a separate images directory for each primary column is most convenient to manage. The image of the root directory is just a picture that is used to put the home and some subsis columns. The level of the catalog should not be too deep, it is recommended not to exceed 3 floors. The reason is very simple, and it is convenient for maintenance management. Others need to pay attention to: 1. Do not use Chinese directory; network banks, use Chinese directorys may have difficulty in the correct display of the URL. 2. Do not use too long directories; although the server supports long file names, too long's directory is inconvenient. 3. Try to use a clear directory; in the example above, you can use DHTMLJavaScript to create a directory, or build a directory with 1, 2, 3, but which one is more clear, more convenient for memory and management? Obviously the former. With the continuous development of web technology, the use of databases or other background procedures automatically generates web pages increasingly common, and the directory structure of the website will have to fly to a new structure.

转载请注明原文地址:https://www.9cbs.com/read-14228.html

New Post(0)