create-Article-controller Implementation
This commit is contained in:
@@ -42,8 +42,8 @@ class FileDatabase implements databaseDAO {
|
||||
$newData = fopen("articles.txt", "xb");
|
||||
fclose($newData);
|
||||
}
|
||||
$previousData = file_get_contents("gaestebuch.txt");
|
||||
if (file_put_contents("gaestebuch.txt", "$newData\n$previousData")) {
|
||||
$previousData = file_get_contents("articles.txt");
|
||||
if (file_put_contents("articles.txt", "$newData\n$previousData")) {
|
||||
// TODO: Vernünftige Rückmeldung implementieren.
|
||||
echo "Artikel erfolgreich gespeichert!";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user