제가 적용한 방법입니다.

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

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

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

댓글 1개

우와~~ 좋은 방법입니다..^^
저도 사용해봐야겠습니다..^^
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
&&nbsp;&nbsp;
20년 전 조회 4,638
20년 전 조회 4,107
20년 전 조회 4,251
20년 전 조회 4,069
20년 전 조회 5,356
20년 전 조회 4,173
20년 전 조회 4,611
&&nbsp;&nbsp;
20년 전 조회 4,178
20년 전 조회 4,339
20년 전 조회 3,940
20년 전 조회 4,026
20년 전 조회 4,587
20년 전 조회 4,345
20년 전 조회 4,231
20년 전 조회 4,110
20년 전 조회 4,891
20년 전 조회 4,450
20년 전 조회 3,973
20년 전 조회 4,392
20년 전 조회 4,515
🐛 버그신고