Hey,
Ich wollte in meine Config.php ne zweite datei includieren danach kommt folgender Fehler.
Array ( [type] => 8 [message] => Undefined index: username [file] => /var/www/ucp/config.php [line] => 21 )
Aber warum ?
PHP
<?php
session_start();
include(DIRECT_DIR .'/lib/class/authorize.class.php');
include(DIRECT_DIR .'/lib/class/mysql.class.php'); //fehler bei include
$ServerName = "Ultimate Dynamic Roleplay";//Servername
//MySQL
$SQL = array(
"host" => "localhost",//HostIP
"user" => "root",//User
"pass" => "Amadeus007",//Passwort
"database" => "webi"//Datenbank
);
//Nichts Ändern!
mysql_connect($SQL["host"],$SQL["user"],$SQL["pass"])or die(mysql_error());
mysql_select_db($SQL["database"])or die(mysql_error());
$Names = $_SESSION['username'];
if(isset($_SESSION['username'])){$SpielerInfo = mysql_fetch_object(mysql_query("SELECT * FROM `accounts` WHERE `Name`='$Names'"));}
$authorize = new Authorize();
//$MySQLConnect = new MySQLclass();
print_r(error_get_last());
?>
Alles anzeigen