Пример #1
0
			</div>
		</div>

		<?php 
if (environment::get('debugging_mode')) {
    ?>
		<div class="errordescription wrapper">
			<h2>Further error information <small>To hide this set debug_mode to false.</small></h2>
			<p>The stacktrace displays the function calls made that led to the error. They are displayed in an inverted order to how they were called.</p>
			<pre><?php 
    echo $moreInfo;
    ?>
</pre>
			
			<?php 
    $messages = spitfire()->getMessages();
    if ($messages) {
        echo '<h2>Debugging messages <small>To hide this set debug_mode to false.</small></h2>';
        echo '<p>List of messages the app generated during it\'s execution</p>';
        echo '<div class="debugmessages">';
        echo '<ul>';
        foreach ($messages as $msg) {
            echo "<li>{$msg}</li>";
        }
        echo '</ul>';
        echo '</div>';
    }
    ?>
		</div>
		<?php 
}
Пример #2
0
 * config but we need to create them first.
 */
if (empty($_SERVER['SCRIPT_FILENAME'])) {
    $_SERVER['SCRIPT_FILENAME'] = exec("pwd");
}
define('BASEDIR', rtrim(dirname($_SERVER['SCRIPT_FILENAME']), DIRECTORY_SEPARATOR), true);
define('SPITFIRE_BASEDIR', BASEDIR . '/spitfire', true);
define('APP_DIRECTORY', 'bin/apps/', true);
define('CONFIG_DIRECTORY', 'bin/settings/', true);
define('CONTROLLERS_DIRECTORY', 'bin/controllers/', true);
define('ASSET_DIRECTORY', 'assets/', true);
define('TEMPLATES_DIRECTORY', 'bin/templates/', true);
define('SESSION_SAVE_PATH', 'bin/usr/sessions/', true);
/* Set error handling directives. AS we do not want Apache / PHP
 * to send the data to the user but to our terminal we will tell
 * it to output the errors. Thanks to this linux command:
 * # tail -f *logfile*
 * We can watch errors happening live. Grepping them can also help
 * filtering.
 */
ini_set("log_errors", "1");
ini_set("error_log", "logs/error_log.log");
ini_set("display_errors", "0");
/* Include Spitfire core.
 */
include 'spitfire/bootstrap.php';
ini_set('memory_limit', '128M');
/**/
/* Call the selected controller with the selected method. */
spitfire()->fire();