本文主要讲解《织梦DedeCMS5.7文章页实现阅读全文功能的教程》的详细内容
//阅读全文开始 if($this->TotalPage>1){ //用正则匹配把分页符去掉 $this->Fields['body2']=preg_replace('/#p#副标题#e#/U','',$this->Fields['body2']); //特别提醒:本教程不可直接输入分页标签,使用时,请把p前面和e后面两个空格去掉。 $this->SplitFields=explode("#p2222#",$this->Fields['body2']); $this->Fields['tmptitle']=(empty($this->Fields['tmptitle'])?$this->Fields['title']:$this->Fields['tmptitle']); $this->Fields['title']=$this->Fields['tmptitle']; $this->TotalPage=count($this->SplitFields); $this->Fields['totalpage']=$this->TotalPage; $TRUEfilenameall=$this->GetTruePath().$fileFirst."_all.".$this->ShortName; $this->ParseDMFields(1,0); $this->dtp->SaveTo($TRUEfilenameall); if($cfg_remote_site=='Y'&&$isremote==1) { //分析远程文件路径 $remotefile=str_replace(DEDEROOT,'',$TRUEfilename); $localfile='..'.$remotefile; //创建远程文件夹 $remotedir=preg_replace("#[^\/]*\.html#",'',$remotefile); $this->ftp->rmkdir($remotedir); $this->ftp->upload($localfile,$remotefile,'ascii'); } } //阅读全文结束
本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。
2021-02-08
2021-02-24
2021-02-08
2021-02-08
2021-02-08
2021-02-08
2021-02-24
2021-02-08