当前位置:网站首页>An unexpected attempt (Imperial CMS list template filters spaces and newlines in smalltext introduction)

An unexpected attempt (Imperial CMS list template filters spaces and newlines in smalltext introduction)

2022-06-26 04:21:00 Scholar and

Online search methods :
`

<?
$qian=array(" "," ","\t","\n","\r","<br/>","<p>","</p>");
$hou=array("","","","","","","","");
$smalltext=str_replace($qian,$hou,$navinfor[smalltext]);
echo $smalltext;
?>

`
The experiment failed , Subsequent use htmlentities Function outputs variables as is , The result contains “ Line breaks like spaces ”.

analysis : When the system is submitted , In the content variable br,p, A carriage return , The line feed labels are uniformly converted to carriage return characters , Saved in the database .
result :

<?
$smalltext=str_replace(' ','',$navinfor[smalltext]);
echo $smalltext;
?>

After many tests, it is found that the parameters to be replaced are “ A carriage return ” That is to say, just hit "enter"

notes : It was an incredible result , Just an unintentional attempt , It turned out to be it , Because I am not very proficient in computer theory , So know what it is and don't know why , Write it down for later decryption

原网站

版权声明
本文为[Scholar and]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202180533333946.html