db 접속을 utf-8 로 접속할려고 합니다. 정보
db 접속을 utf-8 로 접속할려고 합니다.본문
my-sql db 접속을 utf-8로 접속하려면
php 수정해야 할내용을 알려주세요.
php 수정해야 할내용을 알려주세요.
댓글 전체
mysql_query("SET NAMES utf8");
mysql_query("SET NAMES euckr");
...
db접속코드 다음에 넣어보세요~
mysql_query("SET NAMES euckr");
...
db접속코드 다음에 넣어보세요~
청춘불안정님 파일이름하고 대충 위치가 어디인지 알려주세요.
common.php
.....
if (file_exists("$g4[path]/$dbconfig_file"))
{
if (is_dir("$g4[path]/install")) die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('install 디렉토리를 삭제하여야 정상 실행됩니다.'); </script>");
include_once("$g4[path]/$dbconfig_file");
$connect_db = sql_connect($mysql_host, $mysql_user, $mysql_password);
$select_db = sql_select_db($mysql_db, $connect_db);
if (!$select_db)
die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('DB 접속 오류'); </script>");
}
.....
.....
if (file_exists("$g4[path]/$dbconfig_file"))
{
if (is_dir("$g4[path]/install")) die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('install 디렉토리를 삭제하여야 정상 실행됩니다.'); </script>");
include_once("$g4[path]/$dbconfig_file");
$connect_db = sql_connect($mysql_host, $mysql_user, $mysql_password);
$select_db = sql_select_db($mysql_db, $connect_db);
if (!$select_db)
die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('DB 접속 오류'); </script>");
}
.....
common.php
.....
if (file_exists("$g4[path]/$dbconfig_file"))
{
if (is_dir("$g4[path]/install")) die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('install 디렉토리를 삭제하여야 정상 실행됩니다.'); </script>");
include_once("$g4[path]/$dbconfig_file");
$connect_db = sql_connect($mysql_host, $mysql_user, $mysql_password);
$select_db = sql_select_db($mysql_db, $connect_db);
이부분에 추가하면 되나요.
mysql_query("SET NAMES utf8");
if (!$select_db)
die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('DB 접속 오류'); </script>");
}
.....
.....
if (file_exists("$g4[path]/$dbconfig_file"))
{
if (is_dir("$g4[path]/install")) die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('install 디렉토리를 삭제하여야 정상 실행됩니다.'); </script>");
include_once("$g4[path]/$dbconfig_file");
$connect_db = sql_connect($mysql_host, $mysql_user, $mysql_password);
$select_db = sql_select_db($mysql_db, $connect_db);
이부분에 추가하면 되나요.
mysql_query("SET NAMES utf8");
if (!$select_db)
die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('DB 접속 오류'); </script>");
}
.....
edfd