This commit is contained in:
2026-01-30 17:20:52 +09:00
commit 21b6332c9c
459 changed files with 190743 additions and 0 deletions

36
index.php Normal file
View File

@@ -0,0 +1,36 @@
<?php
// /www/kngil/index.php
declare(strict_types=1);
// ---------------------------------
// 1. 기본 상수
// ---------------------------------
define('ROOT', __DIR__);
define('SKIN_PATH', ROOT.'/skin');
// ---------------------------------
// 2. 페이지 결정
// ---------------------------------
$page = $_GET['page'] ?? 'index';
// 파일명 보안 필터
$page = preg_replace('/[^a-zA-Z0-9_\-]/', '', $page);
// ---------------------------------
// 3. skin 파일 매핑
// ---------------------------------
$viewFile = SKIN_PATH.'/'.$page.'.php';
// ---------------------------------
// 4. 존재 여부 체크
// ---------------------------------
if (!is_file($viewFile)) {
http_response_code(404);
exit('404 NOT FOUND');
}
// ---------------------------------
// 5. 화면 위임
// ---------------------------------
require $viewFile;