Fixes in routes, urls, etc
This commit is contained in:
parent
841b16266a
commit
22b90ea1f6
4 changed files with 58 additions and 22 deletions
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue