7.
文章页调用当前文章的tags请用:
<?php $fr = $empire->fetch1( "select infotags from {$dbtbpre}ecms_news_data_{$navinfor[stb]} where id='$navinfor[id]'" );$infotags = $fr[ 'infotags' ];$tag = '';$t = explode( ',', $infotags );$d = count( $t );for ( $i = 0; $i < count( $t ); $i++ ) {if ( $t[ $i ] ) {$tagslink = "[!--news.url--]tags-" . urlencode( $t[ $i ] ) . "-0.html";$tag .= "<a href='$tagslink' target='_blank'>" . $t[ $i ] . "</a> ";}}echo $tag;?>
把我的文章从头到尾看一遍。
14.
规则不对,Apache在.htaccess中添加:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tags-(.+?)-(.+?).html$ /e/tags/index.php?tagname=$1&page=$2
iis服务器在web.config中添加:
<rule name="tags">
<match url="^(.*/)*tags-(.+?)-(.+?).html?*(.*)$" />
<action type="Rewrite" url="{R:1}/e/tags/index.php?tagname={R:2}&page={R:3}" />
</rule>
详见:https://www.weiyiqi.net/html/dgcms/406.html