세션 변수를 이용한 index.php를 사이트 대문 만들기

· 17년 전 · 5226
common.php에서

@session_start();
if( $start_on) set_session("start_on_index", 'on');
if( $_SESSION['start_on_index'] != 'on') alert('xxxxxx', $g4['path'] );


이렇게 두 줄 추가.


$g4['path'](대부분이 index.php)에서는

<?php
$start_on='on;
include '_common.php';

common.php 이전에 start_on 변수 설정

모든 파일은 common.php를 include할 것


참조: http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=15023&sca=&sfl=wr_subject%7C%7Cwr_content&stx=gate&sop=and
|
댓글을 작성하시려면 로그인이 필요합니다.

그누4 팁자료실

그누보드4와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
17년 전 조회 3,392
17년 전 조회 2,888
17년 전 조회 4,583
17년 전 조회 2,456
17년 전 조회 2만
17년 전 조회 2,857
17년 전 조회 5,386
17년 전 조회 1.2만
17년 전 조회 2,584
17년 전 조회 5,227
17년 전 조회 4,928
17년 전 조회 3,787
17년 전 조회 2,661
17년 전 조회 3,108
17년 전 조회 6,377
17년 전 조회 2,699
17년 전 조회 3,046
17년 전 조회 4,828
17년 전 조회 2,430
17년 전 조회 4,482