언

head.php와 head.sub.php문제

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

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-06-02 조회 1,662
13-06-01 조회 1,103
13-06-01 조회 926
13-06-01 조회 1,993
13-06-01 조회 1,693
13-06-01 조회 1,604
13-06-01 조회 2,513
13-06-01 조회 981
13-06-01 조회 1,994
13-06-01 조회 1,107
13-06-01 조회 1,104
13-06-01 조회 1,025
13-06-01 조회 1,710
13-06-01 조회 1,665
13-05-31 조회 3,109
13-05-31 조회 1,835
13-05-31 조회 1,812
13-05-31 조회 1,190
13-05-31 조회 1,090
13-05-31 조회 1,098