[0.1원] 일일이 head 와 tail 을 불러오기 귀찮을때.. 정보
[0.1원] 일일이 head 와 tail 을 불러오기 귀찮을때..본문
bbs/board_head.php
관리자 페이지에서 상단불러오는곳에 값이 없다면 자동으로 ../head.php 를 인클루드 한다
bbs/board_tail.php
관리자 페이지에서 하단불러오는곳에 값이 없다면 자동으로 ../tail.php 를 인클루드 한다
관리자 페이지에서 상단불러오는곳에 값이 없다면 자동으로 ../head.php 를 인클루드 한다
//원본
if ($board[bo_include_head])
@include ($board[bo_include_head]);
if ($board[bo_include_head])
@include ($board[bo_include_head]);
// 수정
if ($board[bo_include_head]) {
@include ($board[bo_include_head]);
} else {
include "../head.php";
}
if ($board[bo_include_head]) {
@include ($board[bo_include_head]);
} else {
include "../head.php";
}
bbs/board_tail.php
관리자 페이지에서 하단불러오는곳에 값이 없다면 자동으로 ../tail.php 를 인클루드 한다
//원본
if ($board[bo_include_tail])
@include ($board[bo_include_tail]);
if ($board[bo_include_tail])
@include ($board[bo_include_tail]);
//수정
if ($board[bo_include_tail]) {
@include ($board[bo_include_tail]);
} else {
include "../tail.php";
}
if ($board[bo_include_tail]) {
@include ($board[bo_include_tail]);
} else {
include "../tail.php";
}
추천
3
3
댓글 5개
adm/board_form.php 에 기본으로 심어두는 방법도 있습니다.
if ($w == "") {
//필요한 항목을 추가
$board[bo_include_head] = "./_head.php";
$board[bo_include_tail] = "./_tail.php";
$board[bo_use_list_view] = '1';
$board[bo_use_dhtml_editor] = '1';
$board[bo_use_good] = '1';
if ($w == "") {
//필요한 항목을 추가
$board[bo_include_head] = "./_head.php";
$board[bo_include_tail] = "./_tail.php";
$board[bo_use_list_view] = '1';
$board[bo_use_dhtml_editor] = '1';
$board[bo_use_good] = '1';
편리하네요.
적용해보니 매우편리하네요.. 감사합니다~!
좋아여~ ^^
고맙습니다~