$abs_path
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
Inhalt: Formular für die Erstellung eines neuen Beitrags
|
||||
-->
|
||||
<?php
|
||||
include_once 'php/model/ArticleManagerDAO.php';
|
||||
include_once 'php/model/ArticleManager.php';
|
||||
include_once $abs_path . '/php/model/ArticleManagerDAO.php';
|
||||
include_once $abs_path . '/php/model/ArticleManager.php';
|
||||
|
||||
if(isset($_POST['title']) && isset($_POST['content']) && isset($_POST['post-category'])) {
|
||||
if(isset($_POST['title']) && isset($_POST['content']) && isset($_POST['category'])) {
|
||||
|
||||
}else{
|
||||
// TODO: Exception werfen.
|
||||
@@ -14,7 +14,7 @@
|
||||
}
|
||||
?>
|
||||
|
||||
<form method="post" action="php/controller/createArticle-controller.php" id="editor-form" class="wp-editor-scope editor-container">
|
||||
<form method="post" action="../php/controller/createArticle-controller.php" id="editor-form" class="wp-editor-scope editor-container">
|
||||
|
||||
<main class="editor-main">
|
||||
<input type="text" id="title" name="title" placeholder="Titel hier eingeben" required>
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
|
||||
<?php
|
||||
//Geschäftslogik:
|
||||
require_once 'php/controller/index-controller.php';
|
||||
|
||||
if (!isset($abs_path)) {
|
||||
require_once "path.php";
|
||||
}
|
||||
require_once $abs_path . "/php/controller/index-controller.php";
|
||||
?>
|
||||
|
||||
<!--
|
||||
@@ -29,18 +30,18 @@ require_once 'php/controller/index-controller.php';
|
||||
<body>
|
||||
|
||||
<?php
|
||||
include_once 'includes/navbar.php';
|
||||
include_once $abs_path . '/includes/navbar.php';
|
||||
//Dynamischer Inhalt:
|
||||
if (isset($_GET["pfad"])) {
|
||||
if (file_exists('content/' . $_GET["pfad"] . '.php')) {
|
||||
include_once 'content/' . $_GET["pfad"] . '.php';
|
||||
if (file_exists($abs_path . '/content/' . $_GET["pfad"] . '.php')) {
|
||||
include_once $abs_path . '/content/' . $_GET["pfad"] . '.php';
|
||||
} else {
|
||||
include_once 'content/404.php';
|
||||
include_once $abs_path . '/content/404.php';
|
||||
}
|
||||
} else {
|
||||
include_once 'content/home.php';
|
||||
include_once $abs_path . '/content/home.php';
|
||||
}
|
||||
include_once 'includes/footer.php';
|
||||
include_once $abs_path . '/includes/footer.php';
|
||||
?>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user