We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 548ce93 commit 162e4fbCopy full SHA for 162e4fb
server.php
@@ -21,7 +21,7 @@ function routeRequest()
21
case '/':
22
echo file_get_contents('./public/index.html');
23
break;
24
- case '/comments.json':
+ case (preg_match('/comments.json*/', $_SERVER["REQUEST_URI"]) ? true : false):
25
if($_SERVER['REQUEST_METHOD'] === 'POST') {
26
$commentsDecoded = json_decode($comments, true);
27
$commentsDecoded[] = ['author' => $_POST['author'],
0 commit comments