initial commit

This commit is contained in:
TLRZ Seyfferth
2018-01-10 10:06:05 +01:00
commit 134137e3a4
12 changed files with 1950 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
if ($_SERVER['REQUEST_METHOD'] != "POST") {
echo "Sorry, ich spreche kein GET.";
return;
}
if (empty($_POST) && empty(file_get_contents('php://input'))) {
echo "Ich brauche INPUT";
return;
}
if ($_GET['controller'] == "Article"){
if ($_GET['action'] == "store") {
$json = file_get_contents('php://input');
$file = fopen(__DIR__.'/data/test_articles.json','w');
fwrite($file, $json);
fclose($file);
echo "Artikel wurden gespeichert.";
}
}