php中的方法,从网上下载了一个网站程序,这个方法没看懂是干嘛的,求指教
function seo($ident)
{
include APP_PATH."/plus/seo.cache.php";
$seo=$seo[$ident];
if(is_array($seo)){
foreach($seo as $k=>$v){
if($v[affiliation]!=""){
[email protected](",",$v['affiliation']);
if($_SESSION[did]!="" && in_array($_SESSION['did'],$did)){
$seo=$v;
}elseif(in_array("0",$did)){
$seo=$v;
}
}else{
$seo=$v;
}
}
}
$data=$this->data;
if(is_array($seo))
{
$cityname = $_SESSION['cityname']?$_SESSION['cityname']:$this->config["sy_indexcity"];
foreach($seo as $key=>$value)
{
$seo[$key] = str_replace("{webname}",$this->config['sy_webname'],$seo[$key]);
$seo[$key] = str_replace("{webkeyword}",$this->config['sy_webkeyword'],$seo[$key]);
$seo[$key] = str_replace("{webdesc}",$this->config['sy_webmeta'],$seo[$key]);
$seo[$key] = str_replace("{weburl}",$this->config['sy_weburl'],$seo[$key]);
$seo[$key] = str_replace("{city}",$cityname,$seo[$key]);
if(is_array($data)){
foreach($data as $k=>$v){
$seo[$key] = str_replace("{".$k."}",$v,$seo[$key]);
}
}
if([email protected]('{seacrh_class}',$seo[$key])){
$rdata=$this->get_search_class($ident,$key);
$seo[$key] = str_replace("{seacrh_class}",$rdata,$seo[$key]);
}
$seo[$key]=str_replace(' ',' ',$seo[$key]);
$seo[$key]=str_replace(array("- -","- -"),'-',$seo[$key]);
$seo[$key]=str_replace(array("- -","- -"),'-',$seo[$key]);
}
}
$this->yunset("title",$seo['title']);
$this->yunset("keywords",$seo['keywords']);
$this->yunset("description",$seo['description']);
}
function yunset($name,$value){
$this->tpl->assign($name,$value);
}
------解决方案--------------------
优化地址栏链接
------解决方案--------------------
你说下哪句不懂,可以给你解释。
0
0
相关文章
如何从PHP中调用Python文件?
我们如何使用使用mysql_fetch_assoc()函数的PHP脚本来显示MySQL表中的所有记录?
ini_set()在PHP中的作用是什么?
在PHP中的readlink()函数
我们如何编写PHP脚本来释放与MySQL结果关联的游标内存?
相关标签:
本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门AI工具
相关专题
热门下载
相关下载
精品课程
相关推荐
/
热门推荐
/
最新课程
WordPress10小时快速入门课程
共60课时 | 12.5万人学习
VuePress: Vue 官方静态网站生成器极速指南
共5课时 | 1万人学习
laravel8+vue-element-admin+nuxt构建咪乐多CMS管理系统
共116课时 | 21.8万人学习
最新文章










