에러 메세지가 뜨는데 왜 그럴까요?

· 2013-05-15 (수) 22:18:56 · 1044 · 1
notice.gif
글쓰기 페이지에서 쓰기 버튼을 쓰면 위와 같은 메세지창이 뜨는데 그렇다고 안되는건 아니고 매번할때마다 저런 메세지가 뜨네요
아시는 분 알려주시면 감사하겠습니다.
복 받으실꺼에요~~

첨부파일

notice.gif (12.7 KB)
0회 2013-05-15 22:18
|

댓글 1개

2013-05-16 (목) 17:44:33
ajax.filter.php 페이지에서 오류가 나서 데이터값을 넘겨주지 못해서 생기는 오류네요
[code]
<?php
include_once("./_common.php");

if (!function_exists('convert_charset'))
{
/*
-----------------------------------------------------------
Charset 을 변환하는 함수
-----------------------------------------------------------
iconv 함수가 있으면 iconv 로 변환하고
없으면 mb_convert_encoding 함수를 사용한다.
둘다 없으면 사용할 수 없다.
*/
function convert_charset($from_charset, $to_charset, $str)
{

if( function_exists('iconv') )
return iconv($from_charset, $to_charset, $str);
elseif( function_exists('mb_convert_encoding') )
return mb_convert_encoding($str, $to_charset, $from_charset);
else
die("Not found 'iconv' or 'mbstring' library in server.");
}
}

header("Content-Type: text/html; charset=$g4[charset]");

$subject = strtolower($_POST['subject']);
$content = strtolower(strip_tags($_POST['content']));

//euc-kr 일 경우 $config['cf_filter'] 를 utf-8로 변환한다.
if (strtolower($g4[charset]) == 'euc-kr')
{
//$subject = convert_charset('utf-8', 'cp949', $subject);
//$content = convert_charset('utf-8', 'cp949', $content);
$config['cf_filter'] = convert_charset('cp949', 'utf-8', $config['cf_filter']);
}

//$filter = explode(",", strtolower(trim($config['cf_filter'])));
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
$filter = explode(",", trim($config['cf_filter']));
for ($i=0; $i<count($filter); $i++)
{
$str = $filter[$i];

// 제목 필터링 (찾으면 중지)
$subj = "";
$pos = strpos($subject, $str);
if ($pos !== false)
{
if (strtolower($g4[charset]) == 'euc-kr')
$subj = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
else
$subj = $str;
break;
}

// 내용 필터링 (찾으면 중지)
$cont = "";
$pos = strpos($content, $str);
if ($pos !== false)
{
if (strtolower($g4[charset]) == 'euc-kr')
$cont = convert_charset('utf-8', 'cp949', $str);//cp949 로 변환해서 반환
else
$cont = $str;
break;
}
}

die("{"subject":"$subj","content":"$cont"}");
?>
[/code]
사용하시는 파일이 이건가요?
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-05-16 조회 835
13-05-16 조회 1,804
13-05-16 조회 1,102
13-05-16 조회 892
13-05-16 조회 1,330
13-05-16 조회 1,622
13-05-16 조회 2,110
13-05-16 조회 990
13-05-16 조회 3,299
13-05-16 조회 2,019
13-05-16 조회 1,124
13-05-15 조회 2,706
13-05-15 조회 1,233
13-05-15 조회 8,412
13-05-15 조회 1,645
13-05-15 조회 1,045
13-05-15 조회 2,028
13-05-15 조회 885
13-05-15 조회 899
13-05-15 조회 1,628