tailieunhanh - Phát triển web với PHP và MySQL - p 75

Building Web Forums CHAPTER 29 715 Article list (different views) View an article reply Add a new article FIGURE There are three main parts of the blah-blah forum system. A summary of the files in this application is shown in Table . TABLE Name Files in the Web Forum Application Type Application Description The main page users will see when they enter the site. Contains an expandable and collapsible list of all the articles on the site. Form used for posting new articles. Stores articles entered in the form. Displays an individual post and a list of the replies to that post. Contains the treenode class, which we. | Figure There are three main parts of the blah-blah forum system. A summary of the files in this application is shown in Table . Table Files in the Web Forum Application Name Type Description Application The main page users will see when they enter the site. Contains an expandable and collapsible list of all the articles on the site. Application Form used for posting new articles. Application Stores articles entered in the form. Application Displays an individual post and a list of the replies to that post. Library Contains the treenode class which we will use to display the hierarchy of posts. Library Brings all the other function libraries for this application together the other Library-type files listed here . Library Data validation functions. Library Database connectivity functions. Library Functions for dealing with storing and retrieving postings. Library Functions for outputing HTML. SQL SQL to set up the database required for this application. Let s go ahead and look at the implementation. 29 Building Web Forums Building Practical PHP and MySQL Projects 716 Part V Designing the Database There are a few attributes we ll need to store about each article posted to the forum the person who wrote it called the poster the title of the article when it was posted and the article body. We will therefore need a table of articles. We ll create a unique ID for each article called the postid. Each article needs to have some information about where it belongs in the hierarchy. We could store information about an article s children with the article. However each article can have many replies so this can lead to some problems in database construction. As each article can only be a reply to one other it is easier to store a reference to the parent article that is the article

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.