Add my template project
This commit is contained in:
13
engine/core/api.php
Normal file
13
engine/core/api.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if(file_exists(__CD__.'api/'.__URL__[1].'/'.__URL__[2].'.php'))
|
||||
require __CD__.'api/'.__URL__[1].'/'.__URL__[2].'.php';
|
||||
else
|
||||
$data = [
|
||||
'error' => true,
|
||||
'message' => 'Endpoint not exists.',
|
||||
];
|
||||
|
||||
echo json_encode($data);
|
||||
exit();
|
Reference in New Issue
Block a user