directory structure

This commit is contained in:
Kilian Hofmann 2024-05-03 12:32:22 +02:00
parent e01c3c9fb0
commit 896d1936b6
8 changed files with 14 additions and 9 deletions

2
.htaccess Normal file
View File

@ -0,0 +1,2 @@
Options +Indexes
IndexIgnore *.code-workspace

2
base/.htaccess Normal file
View File

@ -0,0 +1,2 @@
DENY FROM ALL
ALLOW FROM 127.0.0.1

View File

@ -10,7 +10,7 @@ class DB extends PDO
{ {
$conn = null; $conn = null;
try { try {
$dataAccess = parse_ini_file("configs/db.ini", true); $dataAccess = parse_ini_file("../configs/db.ini", true);
$conn = new PDO( $conn = new PDO(
"mysql:host=" . $dataAccess["ZEDAT"]["host"] . "mysql:host=" . $dataAccess["ZEDAT"]["host"] .

View File

@ -1,3 +1,4 @@
<?php <?php
ini_set("display_errors", 1); ini_set("display_errors", 1);
ini_set("default_charset", "utf-8");
error_reporting(E_ALL); error_reporting(E_ALL);

View File

@ -1,7 +1,7 @@
<?php <?php
include_once "errors.php"; include_once "../base/errors.php";
include_once "headers.php"; include_once "../base/headers.php";
include_once "database.php"; include_once "../base/database.php";
$act = $_POST["act"]; $act = $_POST["act"];

View File

@ -12,10 +12,10 @@
<body> <body>
<?php <?php
include_once "errors.php"; include_once "../base/errors.php";
include_once "headers.php"; include_once "../base/headers.php";
Headers::html(); Headers::html();
include_once "database.php"; include_once "../base/database.php";
$db = DB::openConnection(); $db = DB::openConnection();
@ -45,7 +45,7 @@
?> ?>
</div> </div>
<form action="action.php" method="post" class="add"> <form action="action.php" method="post" class="add">
<label >Name:</label> <label>Name:</label>
<input name="name" placeholder="Name" required /> <input name="name" placeholder="Name" required />
<button name="act" value="add">Hinzufügen</button> <button name="act" value="add">Hinzufügen</button>
</form> </form>