In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Xiaobian to share with you how to solve the custom function of the empire cms profile interception character html problem, I hope you read this article after the harvest, let us discuss it together!
My solution is as follows, write a function to add, we see if it works, there are any problems, I feel OK
First of all, add a custom function in the e/class/connect.php file, such as NoHTML(), which you like to set casually
The code is as follows:
//remove HTML tags function NoHTML($string){$string = preg_replace("']*?>.*? 'si", "", $string);//remove javascript$string = preg_replace("'si", "", $string); //remove HTML tag $string = preg_replace("'([\r\n])[\s]+'", "", $string); //remove white space $string = preg_replace("'&(quot| #34);'i", "", $string); //replace HTML entity $string = preg_replace ('&(amp| #38);'i", "", $string);$string = preg_replace("'&(lt| #60);'i", "", $string);$string = preg_replace("'&(gt| #62);'i", "", $string);$string = preg_replace("'&(nbsp| #160);'i", "", $string);return $string;}
Recommended to learn Empire CMS Tutorial
Then go to the list content template to modify the code
The code is as follows:
$r[smalltext]=esub(NoHTML($r[smalltext]),200,'...... ');$listtemp='[!-- title--]
[!-- smalltext--]
';
That solves the problem. It's easy.
Because it is a Chinese and English website, the website name needs to be used in the title, so it is very convenient to modify it.
After reading this article, I believe you have a certain understanding of how to solve the problem of html when the introduction of empire cms intercepts characters. If you want to know more about it, welcome to pay attention to the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.