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

· 17년 전 · 5198
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,373
17년 전 조회 2,869
17년 전 조회 4,566
17년 전 조회 2,442
17년 전 조회 2만
17년 전 조회 2,845
17년 전 조회 5,370
17년 전 조회 1.2만
17년 전 조회 2,573
17년 전 조회 5,199
17년 전 조회 4,909
17년 전 조회 3,777
17년 전 조회 2,646
17년 전 조회 3,094
17년 전 조회 6,366
17년 전 조회 2,686
17년 전 조회 3,034
17년 전 조회 4,812
17년 전 조회 2,416
17년 전 조회 4,466
🐛 버그신고