summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/index.php b/index.php
index 00ab370c3..895c242ac 100644
--- a/index.php
+++ b/index.php
@@ -258,7 +258,19 @@ register_shutdown_function("check_for_fatal");
* And away we go...
*
*/
-require_once BASEPATH.'core/CodeIgniter.php';
+try {
+ ob_start();
+ require_once BASEPATH.'core/CodeIgniter.php';
+ ob_end_flush();
+} catch (Exception $e) {
+ ob_end_clean();
+ foreach (headers_list() as $header) {
+ $key = explode(":", $header)[0];
+ header_remove($key);
+ }
+ _actual_exception_handler($e);
+ echo "Usage peak: ".format_bytes(memory_get_peak_usage());
+}
/* End of file index.php */
/* Location: ./index.php */