고수님들 이 문제 좀 봐주실래요. > 그누4 질문답변

그누4 질문답변

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

고수님들 이 문제 좀 봐주실래요. 정보

고수님들 이 문제 좀 봐주실래요.

본문

index.php 에 아래와 같이 넣어두었습니다.  도메인에 따라 다른 홈피가 뜨는 것이지요. 아래 코딩은 검증이 된거구요. 제가 다른 서버에서도 이렇게 사용하거든요.

<?

if ($_SERVER[HTTP_HOST]=="www.kkk.net") { $index="index1.html"; }

elseif ($_SERVER[HTTP_HOST]=="kkk.net") { $index="index1.html"; }

elseif ($_SERVER[HTTP_HOST]=="www.kkk.com") { $index="index2.html"; }

elseif ($_SERVER[HTTP_HOST]=="kkk.com") { $index="index2.html"; }

?>

<? include $index; ?>



하지만 kkk.net으로 접속시 아래와 같이 에러가 납니다. 그런데 kkk.net/index1.html 이렇게  주소를 직접 치면 에러가 없습니다. 무엇이 문제일까요?



Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/homeschooler/www/index.php:13) in /home/hosting_users/homeschooler/www/common.php on line 8

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/homeschooler/www/index.php:13) in /home/hosting_users/homeschooler/www/lib/common.lib.php on line 98

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/homeschooler/www/index.php:13) in /home/hosting_users/homeschooler/www/lib/common.lib.php on line 98

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/homeschooler/www/index.php:13) in /home/hosting_users/homeschooler/www/lib/common.lib.php on line 98

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/homeschooler/www/index.php:13) in /home/hosting_users/homeschooler/www/head.sub.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_users/homeschooler/www/index.php:13) in /home/hosting_users/homeschooler/www/head.sub.php on line 34

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

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

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

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

댓글 전체

오류가 안나는건 당연한거 아닌가요?
그쪽엔

<?

if ($_SERVER[HTTP_HOST]=="www.kkk.net") { $index="index1.html"; }

elseif ($_SERVER[HTTP_HOST]=="kkk.net") { $index="index1.html"; }

elseif ($_SERVER[HTTP_HOST]=="www.kkk.com") { $index="index2.html"; }

elseif ($_SERVER[HTTP_HOST]=="kkk.com") { $index="index2.html"; }

?>

이 코드를 부르지 않을테니까요...

조치사항은 위처럼, 위치를 잘 바꿔보는 수밖엔 없습니다.
제가 풀 코드를 가지고 있는것도 아닌이상 더이상 답변을 드릴수는 없겠네요.
위에서 index1.html을 index1.php로 셋팅하고 이 파일 안에 아래 코딩을 넣어 index1.html을 부르게 했더니 에러코드가 나오지 않네요. 이렇게 해결봤습니다. ^^
감사합니다.

<frameset rows='*' border='0'>
<frame name='frame' src='http://kkk.net/index1.html'>
</frameset>
그렇게 하는 것보다 index.php 만 수정 하는게 좋을 것입니다
아래와 같이 모든 공백 라인만 삭제하면 될 겁니다
<?
 <----------- 공백라인 삭제
if ($_SERVER[HTTP_HOST]=="www.kkk.net") { $index="index1.html"; }

<------ 공백라인 삭제
?>
<------ 공백라인 삭제
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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