equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 $config = [ |
|
4 "db" => [ |
|
5 "dsn" => "sqlite:".realpath(dirname(__FILE__))."/../data/renkan.sqlite", |
|
6 "user" => "dbUser", |
|
7 "password" => "pa$$" |
|
8 ], |
|
9 ]; |
|
10 |
|
11 /* |
|
12 I will usually place the following in a bootstrap file or some type of environment |
|
13 setup file (code that is run at the start of every page request), but they work |
|
14 just as well in your config file if it's in php (some alternatives to php are xml or ini files). |
|
15 */ |
|
16 |
|
17 /* |
|
18 Creating constants for heavily used paths makes things a lot easier. |
|
19 ex. require_once(LIBRARY_PATH . "Paginator.php") |
|
20 */ |
|
21 defined("LIBRARY_PATH") |
|
22 or define("LIBRARY_PATH", realpath(dirname(__FILE__) . '/library/')); |
|
23 |
|
24 defined("TEMPLATES_PATH") |
|
25 or define("TEMPLATES_PATH", realpath(dirname(__FILE__) . '/templates/')); |
|
26 |
|
27 defined("RENKAN_PROJECT_TABLE") |
|
28 or define("RENKAN_PROJECT_TABLE", "renkan_project"); |
|
29 |
|
30 /* |
|
31 Error reporting. |
|
32 */ |
|
33 ini_set("error_reporting", "true"); |
|
34 error_reporting(E_ALL|E_STRCT); |