Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- |-----------------------------------------------------------------
- | Site Name
- |-----------------------------------------------------------------
- |
- | This variable will be called throughout the website, allowing
- | you to change all occurences of the website name, through this
- | variable.
- |
- */
- $config['site_name'] = 'Krenia';
- /*
- |-----------------------------------------------------------------
- | Static Salt
- |-----------------------------------------------------------------
- |
- | This variable will hold a static salt, that will be used to add
- | even more protection to the passwords. The dynamic salt can be
- | read from the same table as the password, so if a hacker gained
- | access to the users table, he may be able to guess the salt's
- | code. However, by adding a static salt, it adds to the
- | complexity of the hash.
- |
- */
- $config['static_salt'] = "!-l0v3/v1r7u4l_p37.5!T3S";
- /*
- |-----------------------------------------------------------------
- | Connection Type
- |-----------------------------------------------------------------
- |
- | This variable specifies what kind of connection you are trying
- | to create. Typically 'mysql'. Set to null for no database
- | connection.
- |
- */
- $config['connType'] = 'mysql';
- /*
- |-----------------------------------------------------------------
- | Database Information
- |-----------------------------------------------------------------
- |
- | host - The database host to connect to. Typically 'localhost'.
- | name - The database name to connect to.
- | user - The username to connect to the database with.
- | pass - The password to connect to the database with.
- |
- */
- $config['connInfo'] = array( 'host' => 'localhost',
- 'name' => 'krenia',
- 'user' => 'root',
- 'pass' => ''
- );
- /*
- |-----------------------------------------------------------------
- | Developmental Level
- |-----------------------------------------------------------------
- |
- | 1 - Production environment
- | 2 - Developmental environment
- |
- */
- $config['dev_level'] = 2;
- /*
- |=================================================================
- | End of User-Configurable Variables
- |=================================================================
- */
- /*
- |-----------------------------------------------------------------
- | Error Reporting Level
- |-----------------------------------------------------------------
- |
- | The only reason this will change is so that when developing, it
- | is possible to view any errors. However, when in a production
- | environment, setting error_reporting() to anything but NONE will
- | decrease the execution time of the script.
- |
- */
- if($config['dev_level'] == 1)
- error_reporting(NONE);
- else
- error_reporting(E_ALL);
- /*
- |-----------------------------------------------------------------
- | Start sessions
- |-----------------------------------------------------------------
- */
- session_start();
- /*
- |-----------------------------------------------------------------
- | Include Required Libraries
- |-----------------------------------------------------------------
- |
- | database - A PDO wrapper developed by juddster
- |
- */
- require_once('classes/database.php');
- /*
- |-----------------------------------------------------------------
- | Connect to the database
- |-----------------------------------------------------------------
- |
- | Calls the database class using the above provided connType and
- | connInfo variables.
- |
- */
- if (!is_null($config['connType']) && !is_null($config['connInfo']))
- {
- $database = new database($config['connInfo'], $config['connType']);
- if($config['dev_level'] == 2)
- {
- $database->setVerbose(true);
- $database->setLogging(true);
- }
- }
- ?>
Add Comment
Please, Sign In to add comment