엑

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

· 2008-06-13 (금) 22:56:18 · 5390
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와 관련된 팁을 여러분들과 함께 공유하세요. 나누면 즐거움이 커집니다.

+
제목 글쓴이 날짜 조회
08-06-18 조회 1.2만
08-06-14 조회 2,770
08-06-13 조회 5,391
08-06-13 조회 5,093
08-06-13 조회 3,999
08-06-12 조회 2,828
08-06-12 조회 3,261
08-06-12 조회 6,544
08-06-11 조회 2,865
08-06-11 조회 3,207
08-06-11 조회 4,990
08-06-11 조회 2,595
08-06-11 조회 4,634
08-06-10 조회 3,489
08-06-10 조회 6,698
08-06-07 조회 4,396
08-06-06 조회 3,501
08-06-04 조회 3,372
08-06-04 조회 3,343
08-06-03 조회 3,921