Fix
This commit is contained in:
16
uebung10/api.php
Normal file
16
uebung10/api.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
require_once(__DIR__ . '/Database.php');
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$db = new Database();
|
||||
|
||||
$n = 0;
|
||||
if (isset($_GET['n'])) {
|
||||
$n = $_GET['n'];
|
||||
}
|
||||
$questions = $db->getQuestions($n);
|
||||
|
||||
$questionsobj = json_encode($questions);
|
||||
echo($questionsobj);
|
||||
?>
|
Reference in New Issue
Block a user