Modified default controller from index.php to app.php

This commit is contained in:
absurdo 2023-10-25 13:16:30 +02:00
parent 841b16266a
commit c9365707b8
3 changed files with 51 additions and 5 deletions

View file

@ -1,31 +0,0 @@
<?php
function controller($switch='') {
switch($switch) {
default:
return 'Welcome to the real world!';
break;
case 'good':
return 'All things are good!';
break;
case 'json':
$data=['data' => 'Cool'];
header('Content-Type: application/json; charset=utf-8');
return json_encode($data);
break;
}
}