forked from OkoyaUsman/Meme-Maker-PHP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php
More file actions
31 lines (24 loc) · 696 Bytes
/
config.php
File metadata and controls
31 lines (24 loc) · 696 Bytes
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
<?php
// Setting up the time zone
date_default_timezone_set('Africa/Lagos');
// Host Name
$dbhost = 'localhost';
// Database Name
$dbname = '';
// Database Username
$dbuser = '';
// Database Password
$dbpass = '';
// Defining base url, you must end with a slash "/"
define("BASE_URL", "http://catonite.website/mokomeme/");
// Getting Admin url
define("ADMIN_URL", BASE_URL . "admin" . "/");
//the journey into the database begins here, hop in :)
try {
$pdo = new PDO("mysql:host={$dbhost};dbname={$dbname}", $dbuser, $dbpass);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch( PDOException $exception ) {
echo "Connection error :" . $exception->getMessage();
}
?>