一、内容页变成一行修改

1、打开文件e/class/functions.php

2、找到以下函数

function GetHtml($classid,$id,$add,$ecms=0,$doall=0)

3、在//写文件之前添加代码

/*替换换行与大空格*/

preg_match_all('/

(.*?)/s',$string,$r);

foreach ($r[0] as $key => $value) {

$string=str_replace($value, "[#]".$key."[#]", $string);

$string=preg_replace('[\r\n]', '',$string);

$string=preg_replace('/>\s+(.*?)', '>

foreach ($r[0] as $key => $value) {

$string=str_replace("[#]".$key."[#]",$value, $string);

//写文件

WriteFiletext($file,$addlevel.$string);

原文链接:https://blog.csdn.net/weixin_32807673/article/details/117725862?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166669233216782414937888%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=166669233216782414937888&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-29-117725862-null-null.nonecase&utm_term=%E5%B8%9D%E5%9B%BDcms

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注