1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-04-03 02:01:34 +02:00
Lexiconga/php/config.php
2015-11-02 17:25:08 -07:00

24 lines
No EOL
653 B
PHP

<?php
define("ROOT", $_SERVER["DOCUMENT_ROOT"]);
define("SITE_NAME", "PHP Project");
define("SITE_LOCATION", ROOT . ""); // For absolute file paths: SITE_LOCATION . "/whatever.php"
define("DATABASE_TYPE", "mysql"); //sqlite, mysql, pgsql
function connection() {
// Fill this with relevant data.
$servername = "host";
$username = "username";
$password = "password";
$dbname = "database_name";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
return $conn;
}
?>