게시글 에러 입니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

게시글 에러 입니다. 정보

게시글 에러 입니다.

본문

그누보드를 설치하고 한동안 사용하다 아래와 같은 에러가 납니다.

에러페이지  http://diaps.com/bbs/board.php?bo_table=bbs3_2&wr_id=218

Warning: preg_replace(): Unknown modifier '/' in /home/hosting_users/diamondps/www/lib/common.lib.php on line 465

/lib/common.lib.php 465라인
$content = preg_replace($source, $target, $content);

방법 알려주시면 고맙겠습니다.
부탁드립니다....^^
  • 복사

댓글 전체

/lib/common.lib.php의 내용입니다.

// 내용을 변환
function conv_content($content, $html)
{
    global $config, $board;

    if ($html)
    {
        $source = array();
        $target = array();

        $source[] = "//";
        $target[] = "";

        if ($html == 2) { // 자동 줄바꿈
            $source[] = "/\n/";
            $target[] = "<br/>";
        }

        if ($board[bo_disable_tags])
        {
            //$source[] = "/(\<)([\/]?)($board[bo_disable_tags])/i";
            // 태그에만 적용하던것을 속성(프로퍼티)에도 적용하도록 수정
            $source[] = "/([\<]?)([\/]?)($board[bo_disable_tags])/i";
            $target[] = "$1$2$3-x";
            //$source[] = "/^/";
            //$target[] = "<b>이 페이지는 사용금지 태그 사용으로 인하여 정상 출력되지 않을 수 있습니다.</b><p>";
        }

        // 테이블 태그의 갯수를 세어 테이블이 깨지지 않도록 한다.
        $table_begin_count = substr_count(strtolower($content), "<table");
        $table_end_count = substr_count(strtolower($content), "</table");
        for ($i=$table_end_count; $i<$table_begin_count; $i++)
        {
            $content .= "</table>";
        }

        $content = preg_replace($source, $target, $content);
    }
    else // text 이면
    {
        // & 처리 : &amp; &nbsp; 등의 코드를 정상 출력함
        $content = html_symbol($content);

        // 공백 처리
//$content = preg_replace("/  /", "&nbsp; ", $content);
$content = str_replace("  ", "&nbsp; ", $content);
$content = str_replace("\n ", "\n&nbsp;", $content);

        $content = get_text($content, 1);

        $content = url_auto_link($content);
    }

    return $content;
}
© SIRSOFT
현재 페이지 제일 처음으로