사이트 내 전체검색
그누보드
[개선] 심볼릭 링크된 게시판 스킨의 오류 수정
로빈아빠
https://cmd.kr/gnu/99 URL이 복사되었습니다.

본문

다수의 호스팅 서비스에서 스킨디렉토리등이 symbolic_link 등으로 링크되었을때
include head.php 등의 기능이 원디렉토리 위치에서 동작되어 엉뚱한 파일이 삽입되어
DB,head 등이 정상적으로 동작되지 않는다..
다음으로 변경해야함.. (DOCUMENT_ROOT 에 BBS가 설치된경우)
config.php 에서
include_once("$_SERVER[DOCUMENT_ROOT]/lib/constant.php");  // 상수 정의
include_once("$_SERVER[DOCUMENT_ROOT]/config.php");  // 설정 파일
include_once("$_SERVER[DOCUMENT_ROOT]/lib/common.lib.php"); // 공통 라이브러리

if (file_exists("$_SERVER[DOCUMENT_ROOT]/$dbconfig_file"))
{
    if (is_dir("$_SERVER[DOCUMENT_ROOT]/install")) die("<meta http-equiv='content-type' content='text/html; charset=$g4[charset]'><script language='JavaScript'> alert('install 디렉토리를 삭제하여야 정상 실행됩니다.'); </script>");

head.php 에서
include_once("$_SERVER[DOCUMENT_ROOT]/head.sub.php");

tail.php 에서
include_once("$_SERVER[DOCUMENT_ROOT]/tail.sub.php");

등으로 처리하면됨..

댓글목록

등록된 댓글이 없습니다.

그누보드
190 (3/4P)

Search

Copyright © Cmd 명령어 18.224.66.196