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