-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinitialize.php
35 lines (27 loc) · 1.15 KB
/
initialize.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
ob_start(); // output buffering is turned on
session_start();
// Assign file paths to PHP constants
// __FILE__ returns the current path to this file
// dirname() returns the path to the parent directory
define("PRIVATE_PATH", dirname(__FILE__));
define("PROJECT_PATH", dirname(PRIVATE_PATH));
define("PUBLIC_PATH", PROJECT_PATH . '/public');
define("SHARED_PATH", PRIVATE_PATH . '/shared');
//-------------------------------- Changes these two lines tocorrectly reflect the deployment details
define("DEPLOYMENT_URL", "http://safe");
define("SERVER_ROOT_PATH", "htp://safe");
//--------------------------------------------------------------------------------------
// Assign the root URL to a PHP constant
$public_end = strpos($_SERVER['SCRIPT_NAME'], '/public') + 7;
$doc_root = substr($_SERVER['SCRIPT_NAME'], 0, $public_end);
define("WWW_ROOT", $doc_root);
require_once('functions.php');
require_once('database.php');
require_once('query_functions.php');
require_once('validation_functions.php');
$db = db_connect();
$errors = array();
$config = array();
define("DEBUG_MODE", "ON");
?>