Add sjdict.com

This commit is contained in:
John Alanbrook 2022-11-15 22:45:33 +00:00
parent 506d2605ba
commit 17e95b6d99

View file

@ -20,8 +20,6 @@ if (preg_match('/\.(?:jpg|png|webp|css|ico|js|ttf|woff|txt)/', $_SERVER["REQUEST
return false;
}
load_page($tryuri);
@ -80,12 +78,11 @@ function uri_from_file($file) {
}
function try_file($uri, $ext) {
$tryf = "$uri/index";
$tryuri = ltrim($tryf, '/');
$tryuri = ltrim($uri, '/');
$tryf = ltrim("$tryuri/index", '/');
if (is_file("$tryf.$ext")) return "$tryf.$ext";
else if (is_file("$uri.$ext")) return "$uri.$ext";
else if (is_file("$tryuri.$ext")) return "$tryuri.$ext";
}