짧은 검색 구현
예를 들어 그누보드가 적용된 dsclub.kr/search/?검색어 로 접속 시
웹 서버 디렉토리(루트 폴더 안)에 search폴더를 만들고, /search로 이동.
index.php파일 생성, 아래의 코드를 삽입(dsclub.kr을 원하는 도메인으로 변경)
<?php
$uri = $_SERVER['REQUEST_URI'];]
$parts = explode('/', $uri);
$search_index = array_search('search', $parts);
if ($search_index !== false && count($parts) > $search_index + 1) {
$search_value = $parts[$search_index + 1];
$redirect_url = "https://dsclub.kr/bbs/search.php?sfl=wr_subject%7C%7Cwr_content%7C%7Cmb_id%7C%7Cwr_name%7C%7Cwr_datetime%7C%7Cwr_link%7C%7Cwr_ip&sop=and&stx=" . $search_value;
header("Location: " . $redirect_url);
}
?>
그 후 (예를 들어) dsclub.kr/search/?test 으로 접속하면 test 검색 가능
댓글 4개
민트다이어리
1년 전
감사합니다. ^^
1년 전
와우 심플 단순 감사합니다
DawnDew
1년 전
감사합니다
marty72
1년 전
정말 유용한 기능이네요! 공유 감사드립니다.. 추천 꾹!!
게시판 목록
그누보드5 팁자료실
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 | 3년 전 | 4402 | ||
| 2334 | 2년 전 | 3692 | ||
| 2333 | 2년 전 | 2061 | ||
| 2332 |
swallow
|
2년 전 | 1419 | |
| 2331 | 2년 전 | 2501 | ||
| 2330 | 2년 전 | 3441 | ||
| 2329 |
welcome
|
2년 전 | 2126 | |
| 2328 | 2년 전 | 1499 | ||
| 2327 |
|
2년 전 | 2195 | |
| 2326 | 2년 전 | 1342 | ||
| 2325 | 2년 전 | 2149 | ||
| 2324 | 2년 전 | 1628 | ||
| 2323 |
희동이76
|
2년 전 | 1400 | |
| 2322 | 2년 전 | 2198 | ||
| 2321 | 2년 전 | 1739 | ||
| 2320 |
희동이76
|
2년 전 | 1387 | |
| 2319 | 2년 전 | 2190 | ||
| 2318 |
슈퍼스타맨
|
2년 전 | 1819 | |
| 2317 | 2년 전 | 1487 | ||
| 2316 | 2년 전 | 1965 | ||
| 2315 | 2년 전 | 1767 | ||
| 2314 | 2년 전 | 1269 | ||
| 2313 | 2년 전 | 1456 | ||
| 2312 | 2년 전 | 2492 | ||
| 2311 | 2년 전 | 1714 | ||
| 2310 | 2년 전 | 1709 | ||
| 2309 | 2년 전 | 3336 | ||
| 2308 | 2년 전 | 1024 | ||
| 2307 | 2년 전 | 1617 | ||
| 2306 |
디지털홍익인간
|
2년 전 | 2505 | |
| 2305 | 2년 전 | 1900 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기