Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- # Errors - 1 is on, 0 is off.
- error_reporting(0);
- # Timezone
- date_default_timezone_set("Europe/London");
- # Connection
- $server = "localhost";
- $db_user = "changeme";
- $db_pass = "changeme";
- $database = "changeme";
- $con = new mysqli($server,$db_user,$db_pass,$database);
- if($con->connect_error){
- echo "
- <div class=\"jumbotron\">
- <h1 style=\"text-align:center;\"> Oops! </h1>
- </div>
- <div class=\"container-fluid\">
- <div class=\"well\" style=\"color:red;\">Database connection refused. Open the file config.php and ensure the variables <code>db_user</code>,<code>db_pass</code> and <code>database</code> are using the correct information.</div>
- </div>
- ";
- exit;
- }
- ?>
Add Comment
Please, Sign In to add comment