head.php와 head.sub.php문제

제가 아무생각없이 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이 아닌 다른 포맷으로 저장이 되어서 생긴 문제 였습니다.
메모장이 아닌 다른 에디터에서 해당 문제를 수정하여 적용한 결과
메인페이지에 출력되던 경고메세지도 없어지고 정상 작동합니다..
관심 가져 주신 모든분들께 감사드립니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
12년 전 조회 1,133
12년 전 조회 1,502
12년 전 조회 1,038
12년 전 조회 1,522
12년 전 조회 975
12년 전 조회 789
12년 전 조회 1,843
12년 전 조회 1,553
12년 전 조회 1,475
12년 전 조회 2,380
12년 전 조회 835
12년 전 조회 1,856
12년 전 조회 966
12년 전 조회 982
12년 전 조회 898
12년 전 조회 1,565
12년 전 조회 1,530
12년 전 조회 2,984
12년 전 조회 1,687
12년 전 조회 1,671
🐛 버그신고