검색할때 뜨는 경고문구 좀 봐주세요.
웃으면복이와
3년 전
조회 1,126
메인 검색창에서 검색할때 오류 없이 잘 되거던요..
그런데 신기하게도 다음 특정 단어 s22 s23 이 두개의 단어를 검색할때만 아래 오류가 생겨요.
s20 , s21, s24 나 s25 의 단어로 검색할때는 경고 없이 잘 되요.
이러는 이유를 모르겠어요 ㅠㅠ
Warning: count(): Parameter must be an array or an object that implements Countable in /home1/sisepan/public_html/lib/common.lib.php on line 1455 Warning: join(): Invalid arguments passed in /home1/sisepan/public_html/lib/common.lib.php on line 1463
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변에 대한 댓글 3개
�
웃으면복이와
3년 전
�
엑스엠엘
3년 전
해당 줄 위아래로 20줄 정도는 보여 주셔야 합니다.
if( is_array( $arr_str)) $str_len = count($arr_str); else $str_len=0;
이거로 안 되면
arr_str이 있는 줄 다 올려 주세요.
if( is_array( $arr_str)) $str_len = count($arr_str); else $str_len=0;
이거로 안 되면
arr_str이 있는 줄 다 올려 주세요.
�
웃으면복이와
3년 전
common.lib.php 순정이에요. 수정 안했어요.
[code]
/*
// {link:0} ... {link:n} 과 같은 형식
function view_link($view, $number, $attribute)
{
global $config;
if ($view['link'][$number]['link'])
{
if (!preg_match("/target/i", $attribute))
$attribute .= " target='$config['cf_link_target']'";
return "<a href='{$view['link'][$number]['href']}' $attribute>{$view['link'][$number]['link']}</a>";
}
else
return "{".$number."번 링크 없음}";
}
*/
function cut_str($str, $len, $suffix="…")
{
$arr_str = preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY);
$str_len = count($arr_str);
if ($str_len >= $len) {
$slice_str = array_slice($arr_str, 0, $len);
$str = join("", $slice_str);
return $str . ($str_len > $len ? $suffix : '');
} else {
$str = join("", $arr_str);
return $str;
}
}
// TEXT 형식으로 변환
function get_text($str, $html=0, $restore=false)
{
$source[] = "<";
$target[] = "<";
$source[] = ">";
$target[] = ">";
$source[] = "\"";
$target[] = """;
$source[] = "\'";
$target[] = "'";
if($restore)
$str = str_replace($target, $source, $str);
[/code]
[code]
/*
// {link:0} ... {link:n} 과 같은 형식
function view_link($view, $number, $attribute)
{
global $config;
if ($view['link'][$number]['link'])
{
if (!preg_match("/target/i", $attribute))
$attribute .= " target='$config['cf_link_target']'";
return "<a href='{$view['link'][$number]['href']}' $attribute>{$view['link'][$number]['link']}</a>";
}
else
return "{".$number."번 링크 없음}";
}
*/
function cut_str($str, $len, $suffix="…")
{
$arr_str = preg_split("//u", $str, -1, PREG_SPLIT_NO_EMPTY);
$str_len = count($arr_str);
if ($str_len >= $len) {
$slice_str = array_slice($arr_str, 0, $len);
$str = join("", $slice_str);
return $str . ($str_len > $len ? $suffix : '');
} else {
$str = join("", $arr_str);
return $str;
}
}
// TEXT 형식으로 변환
function get_text($str, $html=0, $restore=false)
{
$source[] = "<";
$target[] = "<";
$source[] = ">";
$target[] = ">";
$source[] = "\"";
$target[] = """;
$source[] = "\'";
$target[] = "'";
if($restore)
$str = str_replace($target, $source, $str);
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
1455 줄은
$str_len = count($arr_str);
1463줄은
$str = join("", $arr_str);