1
0
Fork 0
This repository has been archived on 2024-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
veranstaltung/verbindungsaufbau.php
2013-12-31 15:30:15 +01:00

14 lines
No EOL
468 B
PHP

<?php
$mysqli = new mysqli("localhost", "root", "", "veranstaltung"); //Mit MySQL verbinden
if ($mysqli->connect_error) {
echo "Verbindungsfehler: ". mysql_connect_error();
exit;
}
if (!$mysqli->set_charset("utf8")) { //Zeichensatz auf UTF-8 setzen (Umlaute!)
echo "Fehler beim Laden von UTF-8";
}
$host =htmlspecialchars($_SERVER["HTTP_HOST"]);
$url= rtrim(dirname(htmlspecialchars($_SERVER["PHP_SELF"])), "/\\");
$URL = "http://$host$url";
define("URL", $URL);
?>