Three problems and solutions of website design and maintenance
When we design a website, we often use visual tools such as: Frontpage,dreamweaver. With the site's construction, the site's update will inevitably appear some problems. I maintain my personal website, after three major changes: the first design, the use of FrontPage, each page is independent. After a period of operation, found that the page can not guarantee the consistency of style. The second design, the use of Dreamweaver design, take full advantage of the function of the library, once changed a picture, found that must be involved in all the files uploaded, a huge workload. The third design, the use of PHP, the site to reorganize the file structure, the maintenance of the workload has been greatly reduced. This article I encountered the specific problems and solutions to the detailed list, I hope to help.
Site Maintenance encountered problems:
1: Website style is difficult to ensure consistency. such as the head of each page, the end. If you use the Dreamweaver library, although you can complete all the pages of the update, but each change involves too many pages, upload a heavy workload.
2: The update file is difficult to confirm. As the content of the site increases, the amount of file changes involved is difficult to ensure consistency for new and repealed files.
3: The use of static HTML is difficult to ensure consistency before and after. Typically displays the latest update record in the home page, and if you modify HTML, the workload is large and sometimes difficult to ensure consistency.
After a period of work, especially after contact with PHP, you can use a relatively simple way to overcome the above problems:
1:php provides include and require features that enable you to dynamically invoke other files during the execution of a Web page. So all the pages are designed into PHP files, for the characteristics of the Web page, design a number of file headers and end of the file style. At the beginning of the design, the contents of the file can be consistent, but saved with multiple files. Easy to modify later. If I set up a website, using three kinds of file head and file tail: Home, first-level connection, two-level connection three kinds. The total number of connections to the Web site is up to two. This way, if you update the header content, you can complete it by uploading up to three files.
2: Using the level two directory structure, the latest updated files are concentrated in one directory. Can use a one-month directory, named after the way of the year. File name using file type + Date + Day serial number of the way to store. (The whole site to classify all files, such as databases, PHP article classes, JavaScript classes, etc., using three characters). Information such as global functions is set in one or two directories, and you can update these global information each time you upload files.
3: The updated information in a text file or database storage mode. It is much easier to edit a text file or a database INSERT statement than to maintain a Web page. Because in the Web page, involved in more content, if the maintenance is not good, it is easy to cause Web page error, the often changed information through the form of text file maintenance, using a unified format, maintenance is very simple. It is also easy to display connection information for a period of time or all. If my website uses the following text format to deposit:
Type + title + connection Information + Update date Four fields to express. This allows you to upload the updated pages whenever you update. You can then maintain a file file that updates the information. (The new connection system is automatically maintained according to the update file)
The establishment of a good website, maintenance of the workload is very large, in the initial stage of the establishment of the necessary planning, can be a small amount of maintenance to ensure the consistency of the site style, you can focus on new articles, new content. With the popularity of free PHP space, we can fully utilize the advantages of PHP to overcome the problems encountered during the maintenance of our website.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.