本文是《帝国cms(共311篇)》专题的第 223 篇。阅读本文前,建议先阅读前面的文章:
1、在e/class/userfun.php里添加自定义函数
error_reporting(E_ERROR);
function unicode_encode($str){
preg_match_all('/./u',$str,$matches);
$unicodeStr = "";
foreach($matches[0] as $m){
//拼接
$unicodeStr .= "&#".base_convert(bin2hex(iconv('UTF-8',"UCS-4",$m)),16,10).';';
}
$end = strrpos($unicodeStr, '#')+6;
$unicodeStr = substr($unicodeStr, 0, $end);
return $unicodeStr.';';
}
首页模板调用方式:
<title><?=unicode_encode($public_r[sitename])?></title>
[e:loop={'select siteintro,sitekey from [!db.pre!]enewspublic',1,24,0}]
<meta name="keywords" content="<?=unicode_encode($bqr[sitekey])?>" />
<meta name="description" content="<?=unicode_encode($bqr[siteintro])?>" />
火车头采集发布到帝国cms后为未(待)审核状态设置教程详解
1、在e/class/userfun.php里添加自定义函数 error_reporting(E_ERROR…
推荐 2022-11-26
列表页:
<?
$classid=$GLOBALS[navclassid];
$cinfo=$empire->fetch1("select classname,classpagekey,intro from {$dbtbpre}enewsclass where classid = $classid");
?>
<title><?=unicode_encode($cinfo[classname])?> - <?=unicode_encode($public_r[sitename])?></title>
<meta name="keywords" content="<?=unicode_encode($cinfo[classpagekey])?>" />
<meta name="description" content="<?=unicode_encode($cinfo[intro])?> " />
内容页:
<title><?=unicode_encode($navinfor[title])?> - <?=unicode_encode($public_r[sitename])?></title>
<meta name="keywords" content="<?=unicode_encode($navinfor[keyboard])?>" />
<meta name="description" content="<?=unicode_encode($navinfor[smalltext])?>" />
效果:
您已阅读完《帝国cms(共311篇)》专题的第 223 篇。请继续阅读该专题下面的文章:
本站模板没有任何后门,也不会和我们服务器有任何通信,请您放心使用。
本源码一次性买断,没有二次费用,并享受免费更新。
在使用本站模板时,请不要使用我们的产品从事违反中华人民共和国法律、违反公序良俗的活动,否则我们有权拒绝服务,并配合有关单位予以处置。如果您不符合条件,请勿购买。
售后是指通过QQ与客服联系处理问题,售后过期不影响您对主题的使用和更新。免费三个月售后服务。售后服务时间为工作日早9点到晚5点。如果不在线可以QQ留言,我们会尽快给您答复。
售后服务包括程序的使用、BUG的处理、意见建议等。不包括技术服务、网站优化、二次开发、环境配置、服务器运维等。
代码类商品属于数字化商品,具有可复制性,不支持退款,详见《网络交易管理办法》第二章 第16条 第三类。
请仔细阅读我们的用户协议:用户协议


