清水河做网站有吗?清水河做网站公司|清水河建网站|清水河网站制作|罗湖清水河网站制作公司|网站设计网页设计建设网站DEDECMS5.7的小bug.生成的时候无法在这个位置找到: head.htm2
Posted on 2012 年 06 月 08 日 by 漠岚
DEDECMS5.7的小bug.生成的时候无法在这个位置找到: head.htm2
arc.archives.class.php 文件
?View Code PHP/*** 获得模板文件位置** @access public* @return string*/function GetTempletFile(){global $cfg_basedir,$cfg_templets_dir,$cfg_df_style;$cid = $this->ChannelUnit->ChannelInfos['nid'];if(!empty($this->Fields['templet'])){$filetag = MfTemplet($this->Fields['templet']);if( !preg_match("#\/#", $filetag) ) $filetag = $GLOBALS['cfg_df_style'].'/'.$filetag;}else{$filetag = MfTemplet($this->TypeLink->TypeInfos["temparticle"]);}$tid = $this->Fields['typeid'];$filetag = str_replace('{cid}', $cid,$filetag);$filetag = str_replace('{tid}', $tid,$filetag);$tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$filetag;if($cid=='spec'){if( !empty($this->Fields['templet']) ){$tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$filetag;}else{$tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/article_spec.htm";}}if(!file_exists($tmpfile)){$tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/".($cid=='spec' ? 'article_spec.htm' : 'article_default.htm');} if (!preg_match("#.htm$#", $tmpfile)) return FALSE;//这里只让htm后缀名的文件通过..否则返回false //修改一下 , if (!preg_match("#.(htm|html)$#", $tmpfile)) return FALSE;return $tmpfile;}
本文来自:漠岚的博客
漠岚写的相关文章
TAG: