Mercurial > SimpleWebPresenter
diff common-functions.inc @ 39:bd82b719a0de
Make CacheTimeCheck a singleton.
Robustify if_modified_since check.
Quiet warnings.
Set debug levels.
Fix basepath references.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Fri, 05 Oct 2012 00:21:27 +0200 |
| parents | ca76d31b7d48 |
| children | fbbb82ced6de |
line wrap: on
line diff
--- a/common-functions.inc Thu Oct 04 22:07:19 2012 +0200 +++ b/common-functions.inc Fri Oct 05 00:21:27 2012 +0200 @@ -1,5 +1,14 @@ <?php -include_once 'http-response-status-codes.inc'; +include_once 'CacheTimeCheck.inc'; + +$cache = CacheTimeCheck::instance(__FILE__); +$cache->includeOnce('http-response-status-codes.inc'); + +function basePath() +{ + $l = strrpos($_SERVER['SCRIPT_FILENAME'], $_SERVER['SCRIPT_NAME']); + return substr($_SERVER['SCRIPT_FILENAME'], 0, $l); +} function loadFile($sFilename, $sCharset = 'UTF-8') {
