projects
/
awesomized
/
ext-ion
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
history
|
raw
|
HEAD
docs: update
[awesomized/ext-ion]
/
docs
/
.router.php
1
<
?php
2
3
$file
=
__DIR__
.
urldecode
(
$_SERVER
[
"REQUEST_URI"
]);
4
error_log
(
"uri:
$file\n
"
);
5
6
if
(
is_file
(
$file
)) {
7
return false
;
8
}
9
10
if
(
is_dir
(
$file
) &&
file_exists
(
$file
.
"/index.html"
)) {
11
readfile
(
$file
.
"/index.html"
);
12
}
else
{
13
$file
=
rtrim
(
$file
,
"/"
).
".html"
;
14
if
(
file_exists
(
$file
)) {
15
readfile
(
$file
);
16
}
else
{
17
return false
;
18
}
19
}