메인은 html로 코딩하고있는데 그누보드의 메뉴(nav)를 인클루드하는 방법을 알고싶습니다.
php는 잘 몰라서 소스알려주시면 감사합니다.
|
답변 2개 / 댓글 2개
채택된 답변
+20 포인트
2022-10-01 (토) 02:31:38
.php 이외의 확장자 파일에서 php code 를 인식하도록 하는 설정입니다.
Apache
Copy
AddType application/x-httpd-php .php .html .htm
Copy
AddHandler application/x-httpd-php .php .html .htm
Nginx
Copy
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
Copy
security.limit_extensions = .php .html .htm
Copy
<?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 파일이여야 하고 웹서버 루트 폴더에 있으면
적용되실겁니다
답변에 대한 댓글 2개
2022-09-28 (수) 13:58:10
최신글 불러오는건 index가 php가 아니어도 불러와지던데 php파일이 아니면 안될까요?
답변을 작성하려면 로그인이 필요합니다.