Joke Collection Website - Public benefit messages - For example, Sina, NetEase or other websites, what are column pages, article list pages, channel pages, chart list pages? It’s best to give links one by one.

For example, Sina, NetEase or other websites, what are column pages, article list pages, channel pages, chart list pages? It’s best to give links one by one.

Look at the PHP category you selected, and at the same time you are looking at the effect of a page. In fact, what you see is a static page, and there are many working pages behind it. If you are asking how to combine PHP These things (of course you are more likely to choose PHP's golden partner MySQL database), then I can tell you

(Note: In html5 (I am personally used to it) the file tag is like this)< /p>

< /p>

His column pages, article list pages, channel pages, chart list pages, etc. are actually separate php files, containing two fragments with head and tail html files are included into the page you see.

Our shilling column page is nav.php, the article page is content.php, the channel page is cate.php, the chart list page is char.php, the HTML fragment header file is header.php, and the HTML tail The file is footer.php.

Assume that the page you see is index.php, and the above included files are all in the same directory (change the path according to your own needs), then its source code may be as follows (CSS layout is included in header. In php, typesetting is according to your own requirements):

============================

index.php

============================

include ("header.php"); //HTML header

//The following include may contain specific content that is unique to this page and is not universal< /p>

echo"

";

p>

include (“content.php”); //Content page

include (“cate.php”); //Channel industry

include (“char. php"); //Chart list page

include ("footer.php"); //HTML tail>

Each included file may contain the following content:

============================

header.php:

============================

<?php echo $title;?>< /title></p><p><link rel="stylesheet" type="text/css" href="css.css"></p><p></head></p><p> <body></p><p><!-- This is the end, this is a comment, it is not displayed in HTML--></p><p>============== ==============</p><p>nav.php </p><p>==================== =========</p><p><?php</p><p>//It may be the code to link to the database or something</p><p>//Then navigate from the database Retrieve the column content from the table, which may be the following code</p><p>while($array=mysql_fetch_array(database statement)){</p><p> echo "$array['Navigation key']"; </p><p>} ></p><p>============================</p><p >content.php:</p><p>============================</p><p> <?php </p><p>//Get the content from the database again, and then output it. The specific content depends on how your database table is designed</p><p>while($array=mysql_fetch_array(database statement)){</p ><p> echo "$array['For example, the key of time']";</p><p> echo "$array['For example, the key of author']";</p><p> echo " $array['For example, the key of the content']";</p><p> echo</p><p>"$array['For example, the reply key']";</p><p>} ></p><p>==================== ========</p><p>cate.php:</p><p>======================== ====</p><p> <?php</p><p>//Similarly fetch the channel content from the database</p><p>while($array=mysql_fetch_array(database statement)) {</p><p> echo "$array['Channel key']";</p><p>} ></p><p>============== ===============</p><p>char.php:</p><p>================== ===========</p><p> <?php</p><p>//Similarly retrieve the contents of the chart from the database</p><p>while($array =mysql_fetch_array(database statement)){</p><p> echo "$array['such as related charts or something']";</p><p>} ></p><p>==== ========================</p><p>footer.php:</p><p>======== ====================</p><p><?php</p><p>//If there are no special requirements, you may close the database here< /p><p>mysql_close(); ></p><p><!-- There must be no <html><head></head><body> tags in front of these four header files--></p ><p><!-- Put some information you want to explain here, such as copyright and so on--></p><p></body></p><p></html></ p><p>That’s probably how it is, it’s done with all hands, please support</p></div> <div class="sx mb15"> <ul> <li class="fl">Previous article:<a href="/PublicInterestSMS/hnhxwmxigo.html">What changes have the development of science and technology brought to our lives?</a></li> <li class="fr ziyou">Next article:<a href="/PublicInterestSMS/jfpafagthx.html">How to turn off automatic renewal of Xiaomi mobile phone</a></li> <div class="clear"></div> </ul> </div> </div> </div> <div class="right fr sjwu"> <dl class="wupd"> <div class="notice"> <div class="tab-hd"> <ul><li>Related articles</li></ul> </div> <div class="tab-bd"> <div class="tab-pal"> <ul> <li><a href="/PublicInterestSMS/kddzbkavbn.html">How to check the machine when nokia x7 shuts down?</a></li> <li><a href="/PublicInterestSMS/msctaztjmj.html">How to unsubscribe (cancel) from China Mobile Newspaper?</a></li> <li><a href="/PublicInterestSMS/mtpukyjufu.html">After ICBC made a loan, it received a short message from the bank prompting the use of funds.</a></li> <li><a href="/PublicInterestSMS/fwxuygkqeq.html">Can idle fish be restored if it takes effect for a long time</a></li> <li><a href="/PublicInterestSMS/kykoiwtezt.html">12306 What should I do if my mobile phone fails to verify the SMS verification code? What if mobile phone authentication 12306 fails?</a></li> <li><a href="/PublicInterestSMS/lofoupiyck.html">For the longest comment, reply to the circle of friends and reply to the comments.</a></li> <li><a href="/PublicInterestSMS/kzjskmkyjd.html">Which terminal is Xiaoshan Airport's domestic departure?</a></li> <li><a href="/PublicInterestSMS/kpadalqtqi.html">Volunteer group activity plan</a></li> <li><a href="/PublicInterestSMS/meepuonhmq.html">Will it be displayed if Apple's mobile phone arrears SMS cannot be sent out?</a></li> <li><a href="/PublicInterestSMS/lqvyokrwlb.html">Flirting with your girlfriend</a></li> </ul> </div> </div> </div> </dl> </div> <div class="clear"></div> </div> <div class="footer"> <div class="zh"> <p>copyright 2024 <a href="https://www.4idols.com"><b>Joke Collection Website</b></a> All rights reserved <script type="text/javascript" src="../style/tongji.js"></script></p> </div> </div> </body> </html>