테스트 사이트 - 개발 중인 베타 버전입니다

head.php와 head.sub.php문제

· 12년 전 · 2313 · 3
제가 아무생각없이 head.php에 베너를 한개 추가했는데(메모장에서 작업했습니다.)
메인화면에 다음과 같은 경고가 뜹니다.

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

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

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

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

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

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

head.sub.php파일의 25~31 라인의 내용은

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

입니다.

현재는 25~31번 라인을 주석처리 해놨으나
메인화면에서 로고의 위치, 상단메뉴의 위치등이 원래자리에서 밑으로 처진 상태입니다.
근본적인 해결책이 필요합니다...도와주세요 ㅠㅠ

ps. 27번 라인은 무슨뜻인지도 궁금합니다...

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 3개

ps.질문에 대한 답변만 짧게 드리겠습니다.
직역하면 뭐 만료시간은 0으로 설정하겠다는겁니다.
캐쉬를 사용하지 않고 뒤로가기 등으로 페이지 호출 되더라고 페이지가 캐쉬 정보를 부르지 않고 redirect된다는 겁니다.
아 그렇군요... 감사합니다..^^
해결됐습니다..
메모장에서 작업하고 저장할때 UTF-8이 아닌 다른 포맷으로 저장이 되어서 생긴 문제 였습니다.
메모장이 아닌 다른 에디터에서 해당 문제를 수정하여 적용한 결과
메인페이지에 출력되던 경고메세지도 없어지고 정상 작동합니다..
관심 가져 주신 모든분들께 감사드립니다.

게시글 목록

번호 제목
284508
284499
284492
284490
284484
284481
284478
284476
284474
284472
284470
284458
284457
284454
284453
284447
284446
284444
284441
284440