Changeset 1127
- Timestamp:
- 06/04/2008 09:25:43 AM (2 years ago)
- Files:
-
- 1 modified
-
trunk/wikka.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wikka.php
r1124 r1127 63 63 * code. 64 64 */ 65 $errors = (file_exists('errors')) ? TRUE : FALSE; 65 $track_errors = (file_exists('errors')) ? TRUE : FALSE; 66 ob_start(); // need to pick up tracing messages 66 67 /** 67 68 * Interpret debugging and development/production modes. 68 69 */ 69 if ($debug) 70 { 71 ob_start(); // need to pick up tracing messages 70 if ($debug || $track_errors) 71 { 72 72 error_reporting(E_ALL); // always on for debug mode 73 73 } 74 74 else 75 75 { 76 if ($errors) 77 { 78 ob_start(); 79 error_reporting(E_ALL); // development mode 80 } 81 else 82 { 83 error_reporting(E_ALL ^ E_NOTICE); // production mode 84 } 76 error_reporting(E_ALL ^ E_NOTICE); // production mode 85 77 } 86 78 // -------------------- END DEBUGGING AND ERROR REPORTING --------------------- … … 998 990 // - Compatibility library loaded 999 991 if ($debug) echo "roll...<br/>\n"; 992 $debug_info = ''; 1000 993 if (!$debug) 1001 994 { 1002 ob_end_clean(); // in case there was a previous buffer left from debug mode! 995 $debug_info = ob_get_contents(); 996 @ob_end_clean(); // in case there was a previous buffer left from debug mode! 1003 997 ob_start(); // start buffering output 1004 998 } … … 1022 1016 //output result // @@@ use paragraph 1023 1017 echo '<div class="smallprint">'.sprintf(PAGE_GENERATION_TIME, $totaltime)."</div>\n"; // @@@ should be paragraph 1018 if ($track_errors) 1019 { 1020 echo '<p class="debuginfo">'.$debug_info.'</p>'."\n"; 1021 } 1024 1022 echo "</body>\n</html>"; 1025 1023 } … … 1069 1067 */ 1070 1068 //header('Content-Length: '.$page_length); 1071 ob_end_clean();1069 @ob_end_clean(); 1072 1070 1073 1071 /**