윤

최근게시물에 출력되는 HTML태그 없애는법좀 알려주세요~!

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : www.soj.co.nz

게시물을 html써서 작성하면 최근게시물 뽑아질때 HTML태그도 같이 나오는데 없애는 법을 알려주시면 감사하겠습니다 ^_^

사용하는 최근게시물 스킨 코드는 다음과 같습니다:

<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<?
for ($i=0; $i<count($list); $i++)
{
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 210, "");

// 태그 웹표준으로 변경
$content = str_replace("<P>", "", $content);
$content = str_replace("</P>", "", $content);
$content = str_replace("<BR>", "", $content);


$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$latest_skin_path/img/no_image.gif";
$href = "$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}";

$upday = cut_str($list[$i][wr_datetime], 10, "");
$tmp = explode("-", $upday);
$upday = $tmp[0]."년 ".$tmp[1]."월 ".$tmp[2]."일";

echo " <table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td><a href='$href' class='headlink'>{$list[$i][subject]}</a></td>
</tr>
<tr>
<td class='headtext'>$content... <span class='date'>(<a href='$href' class='link'>자세히 보기</a>)</span></td>
</tr>
<tr>
<td height=20></td>
</tr>
</table>

";

}
?>

<? if (count($list) == 0) { ?>
<div>게시물이 없습니다.</div>
<? } ?>

감사합니다~! ^-^

댓글 3개

$content = cut_str(get_text($list[$i][wr_content]), 210, "");
아래에 넣어주세요..

$content = strip_tags($content);
죄송합니다.. 해봣는데 안되네요.. >.<

다른 방법은 없나요?
순서를 바까보셔요

$content = strip_tags($list[$i][wr_content]);
$content = cut_str($content, 90, "...");
댓글을 작성하시려면 로그인이 필요합니다.

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

+
제목 글쓴이 날짜 조회
09-01-29 조회 1,671
09-01-29 조회 1,449
09-01-29 조회 836
09-01-28 조회 1,751
09-01-28 조회 1,654
09-01-28 조회 1,001
09-01-28 조회 1,140
09-01-28 조회 1,051
09-01-28 조회 1,370
09-01-28 조회 1,064
09-01-28 조회 1,580
09-01-28 조회 1,115
09-01-28 조회 1,005
09-01-28 조회 967
09-01-28 조회 1,670
09-01-28 조회 1,532
09-01-28 조회 1,082
09-01-28 조회 2,625
09-01-28 조회 996
09-01-28 조회 1,624