시도해보십시오. 1. succes 2.metod가 아닌 경우 방법. 마지막 방법은 메모장 2 편집기로 HTML 파일을 열고 파일 메뉴에서 UTF8로 인코딩을 변경하고 저장하는 것입니다. 나는 그것이 해결책이 될 것이라고 생각한다.
$dsn = $config ["driver"] . ':dbname=' . $config ['dbname'] . ';host=' . $config ['host'];
. ';charset=UTF-8'; //---> this is the solution
try {
$this->link = new PDO ($dsn, $config ['user'], $config ['pass']);
// The mysql driver ignores the charset directive in $dsn (yeah, that sucks)
if ($config ["driver"] == 'mysql')
$this->link->exec ("set names utf8");
}
catch (PDOException $e) {
die ("Hata var : " . $e->getMessage());
}
기타 방법 :
$encodings = array("windows-1254","utf-8", "iso-8859-9");
$data = file_get_contents($TempSrc);
$data=mb_convert_encoding($data, 'UTF-8', mb_detect_encoding($data, $encodings));
질문에 대답을 편집하지 마십시오. 아래의 해답과 상관없이 문제를 해결했거나 여러 답을 사용하지 않은 경우에는 주로 자신의 답을 쓰고 동의하십시오. – Joe
답변과 링크를 제공해 주셔서 감사합니다. 유익하고 많은 것을 배웠지 만, 심각하게도이 제목은 내 문제가 무엇인지 설명하지 않습니다. 분명히 검색 할 수있는 것이 아닙니다. 어떻게 대답을 알았습니까? 하지만 어쨌든 고마워 .. – Anders