최신글 리스트에서 데이터를 뽑아와 글을 출력했는데요 띄어쓰기가 채택완료
최신글 리스트에서 데이터를 뽑아와 글을 출력했는데요 띄어쓰가 전혀 안되어 나오네요
코드는 아래와 같습니다.
왜 그런 것일까요? 한 수 부탁드립니다. 꾸벅^^__^^;
|
function bc_code($str, $is_content=1, $only_admin=0) {
global $g4, $bo_table, $wr_id, $board_skin_path;
if ($is_content) {
$str = preg_replace("/\[url:\/\/(.*)\](.*)\[\/url\]/iU", "http://$1' target='_blank'>$2", $str);
$str = preg_replace("/\[s\](.*)\[\/s\]/iU", "$1", $str);
$str = preg_replace("/\[b\](.*)\[\/b\]/iU", "$1", $str);
$str = preg_replace("/\[u\](.*)\[\/u\]/iU", "$1", $str);
$str = preg_replace("/\[(h[1-9])\](.*)\[\/h[1-9]\]/iU", "<$1>$2$1>", $str);
$str = preg_replace("/\[file([0-9])\](.*)\[\/file[0-9]\]/iU", "
$2", $str);
$str = preg_replace("/\[red\](.*)\[\/red\]/iU", "$1", $str);
$str = preg_replace("/\[link([1-2])\](.*)\[\/link[1-2]\]/iU", "$2", $str);
$str = preg_replace("/\[(\/\/[^\s]+)\s+([^\]]+)\]/iUs", "$2", $str);
global $write, $config, $row;
if ($write && $write[mb_id] == $config[cf_admin] && !$row[wr_is_comment]) {
$callback = create_function ('$arg', '
global $g4;
if (strstr($_SERVER[PHP_SELF], "plugin/mobile"))
$arg[1] = preg_replace("/^\.\.\//", "../../", $arg[1]);
$content = $arg[0];
if (file_exists($arg[1])) {
ob_start();
include($arg[1]);
$content = ob_get_contents();
ob_end_clean();
}
return $content;'
);
$str = preg_replace_callback("/include\(\"([^\"]+)\"\)/i", $callback, $str);
}
}
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
Expert
11년 전
HTML 의 경우 출력시 공백이 하나이거나 여러개 이거나 하나로 노출을 합니다.
또는 css 의 margin 속성을 이용해 보시기 바랍니다.
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
채택
채택
답변대기
채택
답변대기
채택
답변대기
채택
채택
답변대기
채택
채택
채택
채택
채택
답변대기
채택
채택