로그인 연동 헤더에러 질문드립니다.

로그인 연동 헤더에러 질문드립니다.

QA

로그인 연동 헤더에러 질문드립니다.

답변 1

본문

회사에서 자체적으로 php날 코딩으로 만들어진 사이트를 갖고 있는데요

그누보드 게[시판을 쓰려고 회사db에 그누보드를 설치 했습니다.

 

root/company 에 회사 내부시스템이 설치되어있고

root/include에 있는 head.php 를 inclue 해와서 쿠키정보를 변수에 담아 로그인 정보를 사용하고있습니다. 

그리고 제가

root/gnuboard 에 그누보드를 설치 했습니다.

 

그누보드 설치후에 index.php에서 root/include에 있는 head.php를 

include "../include/head.php";

include "../include/head_sub.php";

이렇게 가져왔습니다.

 

그런데 아래와 같이 에러가 납니다.

 

------------------------------------------------------------------------------------------------------------

 

Warning: Cannot modify header information - headers already sent by (output started at /home/root/gnuboard/index.php:1) in /home/root/gnuboard/common.php on line 8

 

Warning: Cannot modify header information - headers already sent by (output started at /home/root/gnuboard/index.php:1) in /home/root/gnuboard/common.php on line 620

 

Warning: Cannot modify header information - headers already sent by (output started at /home/root/gnuboard/index.php:1) in /home/root/gnuboard/common.php on line 622

 

Warning: Cannot modify header information - headers already sent by (output started at /home/root/gnuboard/index.php:1) in /home/root/gnuboard/common.php on line 623

 

Warning: Cannot modify header information - headers already sent by (output started at /home/root/gnuboard/index.php:1) in /home/root/gnuboard/common.php on line 624

 

Warning: Cannot modify header information - headers already sent by (output started at /home/root/gnuboard/index.php:1) in /home/root/gnuboard/common.php on line 625

 

Warning: Cannot modify header information - headers already sent by (output started at /home/root/gnuboard/index.php:1) in /home/root/gnuboard/common.php on line 626

 

------------------------------------------------------------------------------------------------------------

 

헤더정보가 충돌을 일으킨거 같은데

여기서 어떤방법으로 include에 있는 head를 가져와서 

거기에서 사용한 세션 정보를 사용할수 있는지 궁금합니다.

 

요약하자면

1. 원래 회사에서 사용하던 로그인 세션정보를 그누보드에서 그대로 사용하려고합니다.

2. /root/incldue에 있는 head.php를 그누보드에 index.php에 include해서 로그인정보를 불러오려고 하는데 그누보드에서 저런 오류를 보여주고 있습니다.

 

이 질문에 댓글 쓰기 :

답변 1

index.php 파일에 추가하지 마시고 head.sub.php 파일에서 <html>태그 시작전에 include 코드 넣어보세요. 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 83
© SIRSOFT
현재 페이지 제일 처음으로