来,现在大家跟着织梦模版小屋的小编一起来看看吧,具体的操作方式
第一步,在织梦网站的根目录下,打开文件:Include/ arc.archives.class.php
第二步,在这个文件中查找以下代码:
@SetSysEnv($this->Fields['typeid'],$this->Fields['typename'],$this->Fields['id'],$this->Fields['title'],'archives');
第三步:讲以上代码修改为:
$this->Fields['body'] = str_ireplace(array('altalt=""','alt=/'/''),'',$this->Fields['body']);
$this->Fields['body'] = preg_replace("@ [/s]{0,}alt[/s]{0,}=[/"'/s]{0,}[/s/S]{0,}[/"'/s] @isU"," ",$this->Fields['body']);
$this->Fields['body'] = str_ireplace("<img " ,"<img alt=/"".$this->Fields['title']."/" ",$this->Fields['body']);
$this->Fields['imgurls'] = str_ireplace(array('altalt=""','alt=/'/''),'',$this->Fields['imgurls']);
$this->Fields['imgurls'] = preg_replace("@ [/s]{0,}alt[/s]{0,}=[/"'/s]{0,}[/s/S]{0,}[/"'/s] @isU"," ",$this->Fields['imgurls']);
$this->Fields['imgurls'] = str_ireplace("<img " ,"<img alt=/"".$this->Fields['title']."/" ",$this->Fields['imgurls']);
第四步,保存刷新
如果本文对你有帮助,欢迎打赏本站