제가 적용한 방법입니다. > 그누4 질문답변

그누4 질문답변

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

제가 적용한 방법입니다. 정보

답변 제가 적용한 방법입니다.

본문

방법은 의외로 간단합니다.
단 하나의 파일만 만들면 됩니다.

index.html을 만들어 아래 소스로 저장하면 끝납니다.

==============  index.html 소스시작  (예제입니다. 여러분 환경에 맞도록 수정하시면 됩니다.) ==============

<?
switch($p) // p는 물음표 뒤에 붙이는 문자.

{

case "comm_":
include "common.php";//반드시 들어가야 함
include "head.sub.php";
include "html/comm.php";//실제로 불러올 파일
include "tail.sub.php";
break;

case "comm":
include "common.php";//반드시 들어가야 함
include "head.sub.php";
include "head.php";
include "html/comm.php";//실제로 불러올 파일
include "tail.php";
include "tail.sub.php";
break;

case "pds":
include "common.php";//반드시 들어가야 함
include "head.sub.php";
include "head.php";
include "html/pds.php";//실제로 불러올 파일
include "tail.php";
include "tail.sub.php";
break;

case "dabsa":
include "common.php";//반드시 들어가야 함
include "head.sub.php";
include "head.php";
include "html/dabsa.php";//실제로 불러올 파일
include "tail.php";
include "tail.sub.php";
break;

default:
include "index.php"; // index
}

?>

==========================  소스 끝  ===============

불러올때는

http://g4설치경로/?p=comm
http://g4설치경로/?p=pds
http://g4설치경로/?p=dabsa

이런식으로 case에 정의내린 그대로 불러오면 됩니다.
그리고 불러올 파일에는 그냥 내용만 입력하면 됩니다.
인클루드니 뭐니 이런거 필요 없습니다.
그냥 보여주고자 하는 내용만 입력하세요.

이런 자료가 제로보드에 있더군요.
거참~~~!

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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