1 |
<? |
<? |
2 |
|
|
3 |
function find_html_file($dir,$file) { |
function find_html_file($dir,$file) { |
4 |
$file="./$dir/$file"; |
if (substr($dir,0,1) == "/") { |
5 |
|
$file="$dir/$file"; |
6 |
|
} else { |
7 |
|
$file="./$dir/$file"; |
8 |
|
} |
9 |
if (file_exists("$file") && is_file("$file")) { return "$file"; } |
if (file_exists("$file") && is_file("$file")) { return "$file"; } |
10 |
if (file_exists("$file.htm") && is_file("$file.htm")) { return "$file.htm"; } |
if (file_exists("$file.htm") && is_file("$file.htm")) { return "$file.htm"; } |
11 |
if (file_exists("$file.html") && is_file("$file.html")) { return "$file.html"; } |
if (file_exists("$file.html") && is_file("$file.html")) { return "$file.html"; } |