Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of garbled codes in Imperial CMS automatic interception of brief introduction

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to solve the problem of garbled code in Imperial CMS automatic interception profile, I believe most people don't know much about it, so share this article for your reference. I hope you will get a lot after reading this article. Let's learn about it together.

Many Imperial CMS users encounter garbled code or other unwanted characters when calling profile or intercepting content. Here is the solution to this problem, friends who encounter similar problems can refer to it.

First open the file e/class/connect.php and find the function sub ($string,$start=0,$length,$mode=false,$dot='')

Put the code in it:

The code is as follows:

$string = str_replace (array ('', &',''), array ('','&','',','), $string)

To be replaced by:

The code is as follows:

$string = str_replace (array ('', &','',''), array ('', &','',','), $string)

Analysis: the Imperial default intercept replacement function does not work on double quotes, which is solved by adding here, so if you encounter other similar situations, you can add the characters to be replaced and the characters after replacement here.

Utf-8 coding:

The code is as follows:

$string = str_replace (array (', &,'), array (', &,'), this is how to solve all the problems of Imperial CMS's automatic interception of the introduction. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report