common.php에서 $write 변수 정보
common.php에서 $write 변수
본문
common.php에 보면
if (isset($bo_table)) {
$board = sql_fetch(" select * from {$g4['board_table']} where bo_table = '$bo_table' ");
if ($board['bo_table']) {
$gr_id = $board['gr_id'];
$write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//$comment_table = $g4['write_prefix'] . $bo_table . $g4['comment_suffix']; // 코멘트 테이블 전체이름
if ($wr_id)
$write = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
}
}
가 있습니다.
$write 변수를 여기에 만드는 이유가 있을까요?
if (isset($bo_table)) {
$board = sql_fetch(" select * from {$g4['board_table']} where bo_table = '$bo_table' ");
if ($board['bo_table']) {
$gr_id = $board['gr_id'];
$write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
//$comment_table = $g4['write_prefix'] . $bo_table . $g4['comment_suffix']; // 코멘트 테이블 전체이름
if ($wr_id)
$write = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
}
}
가 있습니다.
$write 변수를 여기에 만드는 이유가 있을까요?
댓글 전체
$write 변수가 필요한 페이지마다 코딩하는 것보다 한방에 해결하는게 편리해서 아닐까요?
일종의 전역변수처럼 쓸려고 하는 것 같은데요;;;
일종의 전역변수처럼 쓸려고 하는 것 같은데요;;;