--- /dev/null
+<?php
+
+/**
+ * dolphin. Collection of useful PHP skeletons.
+ * Copyright (C) 2013 Johannes 'Banana' Keßler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the COMMON DEVELOPMENT AND DISTRIBUTION LICENSE
+ *
+ * You should have received a copy of the
+ * COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+ * along with this program. If not, see http://www.sun.com/cddl/cddl.html
+ */
+
+/**
+ * this is an example index file. All requests should go through this file.
+ */
+
+# the internal encoding should be set to utf-8
+mb_internal_encoding("UTF-8");
+
+# the default timezone should be set everytime. Otherwise a warning will be throuwn
+date_default_timezone_set('Europe/Berlin');
+
+# magic quotes are evil. make sure they are disabled
+if(ini_get("magic_quotes_gpc") == 1)
+ die('Magic quotes is set to "on", and system is not able to change it. Please update Your php.ini file');
+
+# some constans which are use everywhere
+define('DEBUG', true);
+
+# display debug messages or not
+if(DEBUG === true) {
+ ini_set('error_reporting',-1); // E_ALL & E_STRICT
+ ini_set('display_errors',true);
+}
+else {
+ # this is the setting for productive enviroment.
+ # error messages ONLY visible in testing enviroment
+ # otherwise they are a security risk
+ ini_set('error_reporting',-1); // E_ALL & E_STRICT
+ ini_set('display_errors',false);
+ ini_set('log_errors',true);
+ ini_set('log_errors_max_len',"10M");
+ ini_set('error_log','path/to/error/error.file');
+}
+
+# header information which should be set before making any output
+# those are sepcial for html output
+header('Content-type: text/html; charset=UTF-8');
+header("Date: ".gmdate("D, d M Y H:i:s", time())." GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s", time())." GMT");
+
+# anti cache header
+# those headers will desiable any cache
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+# any ouput after this line
+
+?>