Home > Article > CMS Tutorial > 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']);
Replace the above code with the following code:
The code is as follows:
$tag = strtolower(trim($_SERVER['QUERY_STRING']));
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));
Replace the above code with the following code:
The code is as follows:
$oldkeyword = $keyword = FilterSearch(stripslashes(strtolower($keyword)));
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!