Mercurial > SimpleWebPresenter
comparison cache_check.inc @ 6:6c0162497d56
Improved error reporting, and support for multilevel params.
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Fri, 20 May 2011 22:28:03 +0200 |
| parents | d2da64705bce |
| children | 91ee5f49907e |
comparison
equal
deleted
inserted
replaced
| 5:18aafb1a8986 | 6:6c0162497d56 |
|---|---|
| 1 <?php | 1 <?php |
| 2 if (DEBUG) | |
| 3 var_dump($_SERVER); | |
| 4 | |
| 5 $HTTP_IF_MODIFIED_SINCE=$_SERVER['HTTP_IF_MODIFIED_SINCE']; | |
| 2 $if_modified_since = preg_replace('/;.*$/', '', $HTTP_IF_MODIFIED_SINCE); | 6 $if_modified_since = preg_replace('/;.*$/', '', $HTTP_IF_MODIFIED_SINCE); |
| 3 | 7 |
| 8 $SCRIPT_FILENAME=$_SERVER['SCRIPT_FILENAME']; | |
| 4 $mtime = filemtime($SCRIPT_FILENAME); | 9 $mtime = filemtime($SCRIPT_FILENAME); |
| 5 $gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT'; | 10 $gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT'; |
| 6 | 11 |
| 7 if ($if_modified_since == $gmdate_mod) { | 12 if ($if_modified_since == $gmdate_mod) { |
| 8 header("HTTP/1.0 304 Not Modified"); | 13 header("HTTP/1.0 304 Not Modified"); |
