Dedecms에서 html과 htm의 차이점에 대한 자세한 설명

高洛峰
풀어 주다: 2017-03-24 11:55:00
원래의
1688명이 탐색했습니다.

문서 템플릿을 생성할 때 htm과 html의 차이점은 문서 템플릿을 생성할 때 구문 분석되는지 여부입니다.

참고: 일치하지 않으면 배경 문서를 구문 분석할 때 "템플릿이 존재하지 않아 구문 분석할 수 없습니다."라는 메시지가 나타납니다. 이때 include/arc.archives.class.php에서 564줄의 코드를 수정할 수 있습니다. 실제 상황에 따라 템플릿이 html이고 구문 분석할 수 없는 경우 '#. htm$#'을 '#.html$#'로 변경합니다.

dedecms 소스 코드 arc.archives.class.php 파일의 564번째 줄에서 템플릿 위치를 확인할 수 있습니다.

    /**
     *  获得模板文件位置
     *
     * @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 ( defined('DEDEMOB') )
        {
            $tmpfile =str_replace('.htm','_m.htm',$tmpfile);
        }
        if(!file_exists($tmpfile))
        {
            $tmpfile = $cfg_basedir.$cfg_templets_dir."/{$cfg_df_style}/".($cid=='spec' ? 'article_spec.htm' : 'article_default.htm');
            if ( defined('DEDEMOB') )
            {
                $tmpfile =str_replace('.htm','_m.htm',$tmpfile);
            }
        }
        if (!preg_match("#.htm$#", $tmpfile)) return FALSE;
        return $tmpfile;
    }
로그인 후 복사

참고: 빨간색 글꼴로 표시된 위치

위 내용은 Dedecms에서 html과 htm의 차이점에 대한 자세한 설명의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!