Study
php(피에이치피) error(에러) 관련
메디츠
2024. 1. 14. 14:48
반응형
09년 11월 기준.
php 한글 깨짐
웹브라우저에서 한글이 깨져서 보일 경우
파일의 인코딩이 UTF-8로 되어있는지 확인. (editplus기준 문서-파일 인코딩-파일 인코딩 변경)
charset의 인코딩이 UTF-8인지 확인. (우클릭해서 유니코드로 설정해도 됨)
DB에 한글이 깨져서 들어갈 경우
mysql_query("SET NAMES 'utf8'");
echo $apple->getData(); // array echo 할경우 에러
print_r($apple->getData()); // print_r 사용
$key = $apple->getData()->sub; // 배열값 바로 바인딩
Object of class Component\Cart\CartAdmin could not be converted to string
// 클래스 echo시 에러
반응형