채택완료

라테스트에서 한글이 깨질수있나요?? 기본 라테스트이구요~

2014-01-24 (금) 11:15:45 6,125

라테스트에서 한글이 깨질수있나요?? 기본 라테스트이구요~

바탕화면.png
 
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
    global $g4;
    if ($skin_dir)
        $latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
    else
        $latest_skin_path = "$g4[path]/skin/latest/basic";
    $list = array();
    $sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
    $board = sql_fetch($sql);
    $tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
    //$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
    // 위의 코드 보다 속도가 빠름
    $sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
    //explain($sql);
    $result = sql_query($sql);
    for ($i=0; $row = sql_fetch_array($result); $i++)
        $list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
   
    ob_start();
    include "$latest_skin_path/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}

>> 지금까지 한번도 깨진적이 없다가 에러가 났네요..


|

답변 3개 / 댓글 2개

채택된 답변
+20 포인트
2014-01-24 (금) 12:10:30
common.lib.php 파일에 cut_hangul_last 함수가 있어요. 그걸 한번 이용해보심이..

답변에 대한 댓글 2개

대박 감사드립니다^^
$list['is_notice'] = preg_match("/[^0-9]{0,1}{$list['wr_id']}[\r]{0,1}/",$board['bo_notice']);

if ($subject_len)
$list['subject'] = conv_subject($list['wr_subject'], $subject_len, "...");
else
$list['subject'] = conv_subject($list['wr_subject'], $board['bo_subject_len'], "...");

$list['subject']=cut_hangul_last($list['subject']);

이렇게했는데도 안되네요.. 어떻게 하면좋을까요??

많은 도움이 되었습니다. 감사합니다.

라테스트 리스트에서요

전립선·환자


이문자가 들어가면 에러가나네요.


걸러내는법 없을까요??

답변을 작성하려면 로그인이 필요합니다.