index에 그누보드 header 불러오기

index에 그누보드 header 불러오기

QA

index에 그누보드 header 불러오기

답변 2

본문

메인은 html로 코딩하고있는데 그누보드의 메뉴(nav)를 인클루드하는 방법을 알고싶습니다.

php는 잘 몰라서 소스알려주시면 감사합니다.

이 질문에 댓글 쓰기 :

답변 2

.php 이외의 확장자 파일에서 php code 를 인식하도록 하는 설정입니다.

 

Apache


AddType application/x-httpd-php .php .html .htm

 


AddHandler application/x-httpd-php .php .html .htm

 

Nginx


location ~ \.(php|html|htm)$ {
    root           html;
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi_params;
}

 

php-fpm


security.limit_extensions = .php .html .htm

<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if(G5_COMMUNITY_USE === false) {
    include_once(G5_THEME_SHOP_PATH.'/index.php');
    return;
}
include_once(G5_THEME_PATH.'/head.php');
?>

 

제일상단에 추가해주시면 됩니다. 당연히 인덱스 파일은 php 파일이여야 하고 웹서버 루트 폴더에 있으면
적용되실겁니다

 

 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 15
© SIRSOFT
현재 페이지 제일 처음으로