This article describes how to get the link of the previous article by Zhimeng dedecms. This article describes how to use PHP to get the link of the previous article. For more information, see, the link and title of the post and post are called on the article page. by default, dedecms labels for the previous and next posts are {dede: prenextget & amp; #39; pre & amp; #39 ;} {dede: prenextget & amp; #39; next & amp; #39 ;}. Sometimes out of need, we only need a link instead of a title ,... this article describes how to get the link of the previous article by Zhimeng dedecms. This article describes how to use PHP to get the link of the previous article. For more information, see, on the post page, call the link and title of the post. by default, dedecms labels for the previous and next posts are {dede: prenext get = 'pre'/} {dede: prenext get = 'next '/}. Sometimes, out of need, we only need a link instead of a title. what should we do? Should we be able to use regular expressions? That's right! The final implementation code is provided below. Dedecms Template: www.php1.cn/xiazai/code/dedecms?address code is as follows: demo:prenext get = 'pro' runphp = "yes"} preg_match_all ('/(. + ?) <\/A. *?> /Sim &
1. Detailed introduction to the article link
Introduction: you need to add the previous article and the next button on many pages. I think it is quite good. now I will share it with you and give you a reference. Let's take a look at it with Xiaobian.
5. ecshop call article show previous article _ html/css_WEB-ITnose
Introduction: The ecshop call article displays the next article in the previous article.
6. phpcms2008: phpcms2008 adds the function of the previous article
Introduction: Step 1: modify show. php in the code if (! $ C ['defaultchargepoint']! $ R ['readpoint']) add code // FKE. LA add code // previous Article $ more_pre = $ db-get_one ("SELECT title, url FROM "'. DB_PRE. "content 'where' c
7. PHP implements the function of the previous article on the content page
Introduction: for better user experience on the content site or product site, the previous article is generally provided on the content page, code $ previous is the id of the previous article $ next_item is the id of the next article $ id_array = array (); // Obtain the Content id array obtained by sorting the specified category // Obtain the idif (is_array ($ id_array) {res
8. added the function of the next article in phpcms2008.
Introduction: phpcms2008 adds the function step 1 of the previous article: modify show. php in the code if (! $ C ['defaultchargepoint'] &! $ R ['readpoint']) add code before // // Previous Article $ more_pre = $ db-> get_one ("SELECT title, url
9. added the function of the next article in phpcms2008.
Introduction: phpcms2008 adds the function step 1 of the previous article: modify show. php in the code if (! $ C ['defaultchargepoint'] &! $ R ['readpoint']) add code before // // Previous Article $ more_pre = $ db-> get_one ("SELECT title, url
10. php implementation method summary in the previous article
Introduction: php implements the next article in the previous article. This article mainly uses SQL to judge based on the current id and then filter the data before the current ID or after the ID, let's take a look at the specifics.
[Related Q & A recommendations ]:
Why is html-php invalid?
The above is a summary of the practices of the next article in the previous article. For more information, see other related articles in the first PHP community!