최근게시물에서 특수문자(')만 깨지는데 왜그럴까요.. 제발 도와주세요ㅠㅜ;; 정보
최근게시물에서 특수문자(')만 깨지는데 왜그럴까요.. 제발 도와주세요ㅠㅜ;;본문
http://180.178.53.77/~host01/eng/index.html
최근게시물 끝부분에서 ' 이 문자가 끝나는 부분만
문자대신 $# 이런 글자가 나오는데 왜 그럴까요?ㅠㅠ
처음 시작하는 ' 는 제대로 출력이 되고,
추출되는 글자수를 늘리면 정상출력되요..ㅜㅠ
게시판 스킨을 다른 스킨으로 바꿔도 똑같은 현상입니다.
latest.lib.php 의 소스는 아래와 같습니다.
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
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;
}
?>
최근게시물 끝부분에서 ' 이 문자가 끝나는 부분만
문자대신 $# 이런 글자가 나오는데 왜 그럴까요?ㅠㅠ
처음 시작하는 ' 는 제대로 출력이 되고,
추출되는 글자수를 늘리면 정상출력되요..ㅜㅠ
게시판 스킨을 다른 스킨으로 바꿔도 똑같은 현상입니다.
latest.lib.php 의 소스는 아래와 같습니다.
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
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;
}
?>
댓글 전체
글자가 짤리는 부분에서만 이런 문제가 발생하는데
common.lib.php의 str쪽의 문제일까요?ㅜ
common.lib.php의 str쪽의 문제일까요?ㅜ
// & · 등을 정상으로 출력
function html_symbol($str)
{
return preg_replace("/\&([a-z0-9]{1,20}|\#[0-9]{0,3});/i", "&\\1;", $str);
}
이 부분의 문제일까요?
function html_symbol($str)
{
return preg_replace("/\&([a-z0-9]{1,20}|\#[0-9]{0,3});/i", "&\\1;", $str);
}
이 부분의 문제일까요?
common.lib.php 중간의
$target[] = "'"; 를 $target[] = "'"; 로 수정한 해결되네요...
이유는 모른채....ㅠㅠㅠㅠ
$target[] = "'"; 를 $target[] = "'"; 로 수정한 해결되네요...
이유는 모른채....ㅠㅠㅠㅠ