TWLan Forum

Full Version: xampp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ich habe mir mal einen eigenen Server mit XAMP gemacht, uind nun möchte ich, dass man nicht immer http://localhost/start.html eingeben muss, sondern nur http://localhost eingeben muss, wie bei DSLan
über htacces
einfach googlen
oder start.html
index.html nennen
Die Datei, die am Anfang stehn soll, muss index.html heißen.
@Bitch: in der Htaccess kann man es mit directory index oder so definieren
Bei diesen PHP-Code zeigt er mir an, wenn ich alles richtig eingegeben habe, "Zugriff verweigert" an.
PHP Code:
<?php
$username 
$_POST["username"];
$passwort $_POST["password"];
$passwort md5($password);

$log 0;
$admindatei fopen ("admin.txt","r");
while (!
feof($admindatei))
   {
   
$zeile fgets($admindatei,500);
   
$userdata explode("|"$zeile);

   if (
$userdata[0]==$username and
   
$passwort==trim($userdata[1]))
      {
      echo 
"Hallo Admin";
      
$str '<a href="localhost/phpmyadmin">Datenbank</a>';
      echo (
$str);
      
$log 1;
   }
}
fclose($admindatei);

if (
$log==0)
   {
   echo 
"Zugriff verweigert";
   
$str ' <a href="index.html>zurück</a>';
   echo (
$str);
   }
?>