1234567891011121314151617181920212223 |
- <?php
- //get environment variables
- $db_user = getenv('EV_php_user');
- $db_pass = getenv('EV_php_pass');
- $db_name = getenv('EV_php_name');
- $db_host = getenv('EV_php_host');
- $db_init = "mysql:host={$db_host};dbname={$db_name};charset=utf8";
- $db = new PDO($db_init, $db_user, $db_pass);
- //set some db attributes
- $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
- $db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
- $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- if (true) {
- //add backends here
- require_once 'backend/users/index.php';
- }
- ?>
|