php 한글 깨짐 질문드립니다. 정보
php 한글 깨짐 질문드립니다.본문
그누보드 사용시
<?php
include_once("./_common.php");
header("Content-Type: text/html; charset=$g4[charset]");
?>
를 하면 쿼리문 작성시 제대로 데이터를 얻어오는데
php문안에 echo "한글";
글을 쓰면 한글 문자열이 깨집니다.
반대로
header("Content-Type: text/html; charset=$g4[charset]");
를 지우게 되면
echo "한글"; 은 제대로 출력이 되는데
쿼리 결과값들이 깨져서 나옵니다
어떻게 처리해야 좋을지요?
<?php
include_once("./_common.php");
header("Content-Type: text/html; charset=$g4[charset]");
?>
를 하면 쿼리문 작성시 제대로 데이터를 얻어오는데
php문안에 echo "한글";
글을 쓰면 한글 문자열이 깨집니다.
반대로
header("Content-Type: text/html; charset=$g4[charset]");
를 지우게 되면
echo "한글"; 은 제대로 출력이 되는데
쿼리 결과값들이 깨져서 나옵니다
어떻게 처리해야 좋을지요?
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339