- Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathindex.php
More file actions
25 lines (22 loc) · 606 Bytes
/
index.php
File metadata and controls
25 lines (22 loc) · 606 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
$path = 'index';
$filename = 'index';
if(array_key_exists('PATH_INFO',$_SERVER)){
$pathinfo = $_SERVER['PATH_INFO'];
$pathinfo = explode('/', substr($pathinfo, 1));
if(count($pathinfo) == 2) {
$path = $pathinfo[0];
$filename = $pathinfo[1];
}else{
// include '.'.$path;
// exit;
if($pathinfo[0] == 'favicon.ico'){
header(200);
header('Content-Type','image/x-icon');
include './public/images/favicon.ico';
exit;
}
$filename = 'login';
}
}
include './views/' . $path . '/' . $filename . '.html';