검색 한글자 완벽히 막자 정보
검색 한글자 완벽히 막자본문
common.lib.php
// 검색어 특수문자 제거
function get_search_string($stx)
{
$stx_pattern = array();
$stx_pattern[] = '#\.*/+#';
$stx_pattern[] = '#\\\*#';
$stx_pattern[] = '#\.{2,}#';
$stx_pattern[] = '#[/\'\"%=*\#\(\)\|\+\&\!\$~\{\}\[\]`;:\?\^\,]+#';
$stx_pattern[] = '/^[0-9]{1}$/';
$stx_pattern[] = '/^[a-z]{1}$/';
$stx_pattern[] = '/^[A-Z]{1}$/';
$stx_replace = array();
$stx_replace[] = '';
$stx_replace[] = '';
$stx_replace[] = '.';
$stx_replace[] = '';
$stx = preg_replace($stx_pattern, $stx_replace, $stx);
return $stx;
}
https://xxx.net/bbs/search.php?url=https%3A%2F%2Fxxx.net%2Fbbs%2Fsearch.php&stx=n&search=
브라우저에서 위에처럼 주소 치고 검색 시 검색이 가능하고 인기 검색어관리에 표시가 됩니다.
그럴 때 이 기능을 사용합니다.
만약 틀리면 댓글달아주세요. 뿅~
1