HTML and CSS Reference
In-Depth Information
// Server path to the system folder (for includes)
define('SYS_PATH', APP_PATH . '/system');
// Relative path to the form processing script (i.e. /realtime/process.php)
define('FORM_ACTION', remove_unwanted_slashes(APP_FOLDER . '/process.php'));
//-----------------------------------------------------------------------------
// Initializes the app
//-----------------------------------------------------------------------------
// Starts the session
if (!isset($_SESSION)) {
session_start();
}
// Loads the configuration variables
require_once SYS_PATH . '/config/config.inc.php';
// Turns on error reporting if in debug mode
if (DEBUG===TRUE) {
ini_set('display_errors', 1);
error_reporting(E_ALL^E_STRICT);
} else {
ini_set('display_errors', 0);
error_reporting(0);
}
// Sets the timezone to avoid a notice
date_default_timezone_set(APP_TIMEZONE);
// Registers class_loader() as the autoload function
spl_autoload_register('class_autoloader');
//-----------------------------------------------------------------------------
// Function declarations
//-----------------------------------------------------------------------------
/**
* Breaks the URI into an array at the slashes
*
* @return array The broken up URI
*/
function parse_uri( )
{
// Removes any subfolders in which the app is installed
$real_uri = preg_replace(
'~^'.APP_FOLDER.'~',
'',
$_SERVER['REQUEST_URI'],
1
);
 
Search WWH ::




Custom Search