Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.example.php
More file actions
Latest commit
18 lines (16 loc) · 536 Bytes
/
Copy pathconfig.example.php
File metadata and controls
18 lines (16 loc) · 536 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
// config.example.php - Example configuration for contributors
// Rename to config.php and fill in your own credentials
// Database configuration
$host = 'localhost';
$dbname = 'your_database';
$username = 'your_username';
$password = 'your_password';
// Establish database connection
try {
$pdo = newPDO("mysql:host=$host;dbname=$dbname", $username, $password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException$e) {
die("Database connection failed: " . $e->getMessage());
}
?>