Home> CMS Tutorial> DEDECMS> body text

What should I do if the dede search keyword/tag label cannot distinguish between uppercase letters?

藏色散人
Release: 2019-12-27 09:37:35
Original
2312 people have browsed it

What should I do if the dede search keyword/tag label cannot distinguish between uppercase letters?

dede What should I do if the search keywords/tags cannot distinguish between uppercase letters?

DEDECMS When searching within the site, if the search term contains capital letters, it will be filtered out. There is also a bug that when accessing a tag containing capital letters, it will prompt that the tag does not exist

Recommended Study:CMMS

When we use the DEDECMS site to search, if the search terms contain capital letters, they will be filtered out, and when accessing tags containing capital letters, they will be filtered out. Prompt label does not exist bug. Before the official patch is released, you can use the strtolower() function to convert uppercase letters into lowercase letters for a temporary solution.

Specific modification method:

Open the tags.php file in the root directory of the website (to solve the problem of tags not being recognized in capital letters), and find the following line of code:

The code is as follows:

$tag = trim($_SERVER['QUERY_STRING']);
Copy after login

Replace the above code with the following code:

The code is as follows:

$tag = strtolower(trim($_SERVER['QUERY_STRING']));
Copy after login

Then open the /plus/search.php file (this is to modify the search problem), Find the following line of code:

The code is as follows:

$oldkeyword = $keyword = FilterSearch(stripslashes($keyword));
Copy after login

Replace the above code with the following code:

The code is as follows:

$oldkeyword = $keyword = FilterSearch(stripslashes(strtolower($keyword)));
Copy after login

End of code modification , so that when we search on the search page, no matter whether the input is uppercase or lowercase, it can be summarized in the current search results.

The above is the detailed content of What should I do if the dede search keyword/tag label cannot distinguish between uppercase letters?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!