• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

php中的方法,从网上下载了一个网站程序,这个步骤没看懂是干嘛的,求指教

php 搞代码 3年前 (2022-01-24) 24次浏览 已收录 0个评论

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}”,$thi@本文9来源gao($daima.com搞@代@#码8网^搞代gaodaima码s->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);
}
——解决方案——————–
优化地址栏链接
——解决方案——————–
你说下哪句不懂,可以给你解释。


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:php中的方法,从网上下载了一个网站程序,这个步骤没看懂是干嘛的,求指教
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址