dir function getFileContents($filename, $convText = true) { global $g_contentdir, $DOCUMENT_ROOT; $g_contentdir = $_SERVER['DOCUMENT_ROOT'].'/content'; // debugLog("utils.php::getFileContents($filename, $convText)"); $content = ""; $filename = "$g_contentdir/$filename"; $fp = @fopen($filename, "r"); if ($fp) { $content = fread($fp,filesize("$filename")); // if ($convText) // $content = text2html($content); } /* else debugLog("utils.php::getFileContents($filename, $convText), error opening file"); */ return $content; } $main_content = 'main.txt'; if (isset($_GET['pg']) && ($_GET['pg'] > 0 && $_GET['pg'] <= 3)) { $main_content = 'page'. $_GET['pg'] . '.txt'; } ?>
|