extend.lib.php와 head.sub.php 에러 ㅠㅠ > 그누4 질문답변

그누4 질문답변

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

extend.lib.php와 head.sub.php 에러 ㅠㅠ 정보

extend.lib.php와 head.sub.php 에러 ㅠㅠ

본문

홈페이지 상단에 아래와 같은 에러가 뜨네요. 근데 그 밑으로 홈피 레이아웃은 정상적으로 뜹니다. 원인이 뭐죠?? -_-;;;;;;


Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/urimanse/www/extend/extend.lib.php:1) in /home/hosting_users/urimanse/www/head.sub.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/urimanse/www/extend/extend.lib.php:1) in /home/hosting_users/urimanse/www/head.sub.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/urimanse/www/extend/extend.lib.php:1) in /home/hosting_users/urimanse/www/head.sub.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/urimanse/www/extend/extend.lib.php:1) in /home/hosting_users/urimanse/www/head.sub.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/urimanse/www/extend/extend.lib.php:1) in /home/hosting_users/urimanse/www/head.sub.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/urimanse/www/extend/extend.lib.php:1) in /home/hosting_users/urimanse/www/head.sub.php on line 39


에러구문에 나오는 head.sub.php의 소스는 아래입니다. 우선은 주석처리하니까 레이아웃은 깨지지 않는데 로그인/로그아웃/글쓰기 등에서 페이지 전환시 잠시 에러페이지가 떴다가 사라지네요.ㅠㅠ

header("Content-Type: text/html; charset=$g4[charset]");
$gmnow = gmdate("D, d M Y H:i:s") . " GMT";
header("Expires: 0"); // rfc2616 - Section 14.21
header("Last-Modified: " . $gmnow);
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: pre-check=0, post-check=0, max-age=0"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/.0


회사컴으로 작업을 하다가 오늘 낮부터 갑자기 이러네요. 회사컴에 아크로에디터를 깔았는데 utf-8 설정이 안되는지 한글이 ㅁ으로 깨져서 나왔는데 그래도 무시하고 계속 작업을 하다보니 이렇게 되었습니다.
웹상에서는 한글이 정상적으로 나왔습니다.

이거 원인이 뭘까요ㅜㅜ

댓글 전체

header() 함수를 사용하기 전에 그 어떤 출력(공백/엔터/HTML등)도 선행되어서는 안됩니다.

PHP4 이상의 output buffering 기능 사용하기.
http://l2zeo.com/it/210?category=22
extend.lib.php 파일에 BOM(Byte Order Mark)이 있어서 그렇습니다.
BOM을 출력으로 보내는 바람에 head.sub.php의 header()함수에서 에러가 발생합니다.
에디트플러스로 extend.lib.php 파일을 열고 새이름으로 저장할 때 인코딩을 UTF-8로 선택해 주시면  BOM이 제거됩니다.
메모장은 UTF-8로 파일 저장시 BOM을 자동으로 삽입합니다.
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT