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

14 lines
468 B
PHP
Raw Permalink Normal View History

2013-12-27 10:20:00 +01:00
<?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";
}
2013-12-31 15:30:15 +01:00
$host =htmlspecialchars($_SERVER["HTTP_HOST"]);
$url= rtrim(dirname(htmlspecialchars($_SERVER["PHP_SELF"])), "/\\");
$URL = "http://$host$url";
define("URL", $URL);
2013-12-27 10:20:00 +01:00
?>