-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.inc.php
More file actions
56 lines (39 loc) · 1.58 KB
/
config.inc.php
File metadata and controls
56 lines (39 loc) · 1.58 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
$config['site'] = array();
$config['site']['name'] = 'API Framework';
$config['site']['location'] = 'http://'.$_SERVER['SERVER_NAME'].'/'.str_replace('index.php','', $_SERVER['SCRIPT_NAME']);
// The name and address the emails will come from, and the template location
$config['email'] = array();
$config['email']['name'] = 'Web bot';
$config['email']['address'] = 'bot@example.com';
$config['email']['templates'] = 'email-templates/';
// Database connection
$config['database'] = array();
$config['database']['server'] = 'localhost';
$config['database']['user'] = 'username';
$config['database']['password'] = 'password';
$config['database']['database'] = 'api_framework';
// Table names, in case you want to change them
$config['database']['tables'] = array();
$config['database']['tables']['users'] = 'users';
$config['database']['tables']['reset_links'] = 'reset_links';
$config['database']['tables']['logger'] = 'logger';
// User manager settings
$config['users']=array();
$config['users']['reset_timeout'] = 4; // How long a reset link is valid, in hours
// Enter all IP addresses where you want $_DEV to be true
$_DEV = (in_array( $_SERVER['REMOTE_ADDR'],
array(
'69.172.145.158'
)
));
// Autoload classes
spl_autoload_register( function($class) {
if ( file_exists( $class.'.controller.php' ) ) {
include( $class.'.controller.php' );
} else if ( file_exists( 'lib/'.$class.'.class.php' ) )
include( 'lib/'.$class.'.class.php' );
else if ( file_exists( $class.'.controller.php' ) )
include( $class.'.controller.php' );
});
?>