답변 1개
채택된 답변
+20 포인트
1년 전
/bbs/faq.php 파일에 아래 부분을 추가해주세요.
insert_popular('fa_subject', $stx);
</p>
<p> if($stx) {</p>
<p> $sql_search = " and ( INSTR(fa_subject, '$stx') > 0 or INSTR(fa_content, '$stx') > 0 ) ";</p>
<p> insert_popular('fa_subject', $stx);</p>
<p> }</p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
코니팡
1년 전
e
eyekiss
1년 전
[code]
if($stx) {
$sql_search = " and ( INSTR(fa_subject, '$stx') > 0 or INSTR(fa_content, '$stx') > 0 ) ";
$field = array('fa_subject');
insert_popular($field, $stx);
}
[/code]
if($stx) {
$sql_search = " and ( INSTR(fa_subject, '$stx') > 0 or INSTR(fa_content, '$stx') > 0 ) ";
$field = array('fa_subject');
insert_popular($field, $stx);
}
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
반영은 잘 되지만, 에러메시지가 살짝 뜹니다.
Warning: in_array() expects parameter 2 to be array, string given in /home/~~/www/lib/common.lib.php on line 3066
3066번째줄을 찾아가보면 이렇게 되어 있네요...
한번 더 부탁드립니다.!
감사합니다.ㅠ
// 인기검색어 입력
function insert_popular($field, $str)
{
global $g5;
if(!in_array('mb_id', $field)) {
$sql = " insert into {$g5['popular_table']} set pp_word = '{$str}', pp_date = '".G5_TIME_YMD."', pp_ip = '{$_SERVER['REMOTE_ADDR']}' ";
sql_query($sql, FALSE);
}
}