테스트 사이트 - 개발 중인 베타 버전입니다

일반html페이지 회원만 볼 수있도록... 채택완료

스카이바디 10년 전 조회 5,456

그누보드5 설치 홈페이지

메뉴 중 특정 일반페이지를 회원만 볼 수 있도록 하고 싶습니다. 소스 코딩

방법 좀 알려주시면 감사하겠습니다. 꾸벅 ^^;

 

댓글을 작성하려면 로그인이 필요합니다.

답변 3개

채택된 답변
+20 포인트

댓글을 작성하려면 로그인이 필요합니다.

일단 경로를 알아야겠지요

1.html 이라는 페이지의 위치가

도메인/그누보드설치위치/

도메인/일반폴더/

이러한 경우 $g4_path 를 ../일반폴더로 설정하고 _common.php을 일반페이지에 만들어주고 불러오면 됩니다

 

도메인/  이렇게 그누보드가 설치되고 일반파일도 위치가 같다면

$g4_path 를 ./로 설정하고 _common.php를 불러오면 됩니다  

 

일반적으로 _common.php에서는 common.lib.php 파일을 불러오므로 세션과 함수를 사용할 수 있게 됩니다

$is_member 는 회원일때 라는 변수 입니다 이변수를 이용해 if구문을 넣으시면 되겠습니다 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

10년 전

페이지 들어가는곳에 $is_member 나 $member 값이 있는지를 검사해주면 되겠습니다.

 

</strong></p><p><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.600000381469727px; background-color: rgb(255, 255, 255);">if( !$is_member ) {</strong></p><p><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.600000381469727px; background-color: rgb(255, 255, 255);">  exit; </strong></p><p><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.600000381469727px; background-color: rgb(255, 255, 255);">}</strong></p><p><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.600000381469727px; background-color: rgb(255, 255, 255);">else {</strong></p><p><font face="돋움, dotum, helvetica"><span style="font-size: 12px; line-height: 21.600000381469727px; background-color: rgb(255, 255, 255);"><b>/* 페이지 내용 */</b></span></font></p><p><font face="돋움, dotum, helvetica"><span style="font-size: 12px; line-height: 21.600000381469727px; background-color: rgb(255, 255, 255);"><b>}</b></span></font></p><p><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.600000381469727px; background-color: rgb(255, 255, 255);">

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인