Added files to initial project

This commit is contained in:
Antonio de la Rosa 2022-04-28 14:52:30 +02:00
commit 0c6ddd06bb
6 changed files with 870 additions and 0 deletions

View file

@ -0,0 +1,8 @@
<?php
function controller() {
return 'Welcome to my home';
}

View file

@ -0,0 +1,31 @@
<?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;
}
}