/[corp_html]/inc/find_html_file.inc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /inc/find_html_file.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations)
Mon Oct 29 14:03:52 2001 UTC (22 years, 5 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -0 lines
fix

1 <?
2
3 function find_html_file($dir,$file) {
4 if (substr($dir,0,1) == "/" && $dir !="") {
5 $file="$dir/$file";
6 } elseif ($dir == "" && substr($file,0,1) == "/") {
7 // $file
8 } else {
9 $file="./$dir/$file";
10 }
11 if (file_exists("$file") && is_file("$file")) { return "$file"; }
12 if (file_exists("$file.htm") && is_file("$file.htm")) { return "$file.htm"; }
13 if (file_exists("$file.html") && is_file("$file.html")) { return "$file.html"; }
14 return 0;
15 }
16
17 ?>

  ViewVC Help
Powered by ViewVC 1.1.26