Add my template project
This commit is contained in:
@@ -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();
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$data = [
|
||||
'error' => false,
|
||||
'message' => 'test',
|
||||
];
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
require __CD__.'route.php';
|
||||
require __TD__.'index.php';
|
||||
@@ -0,0 +1 @@
|
||||
<?php
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
if(__URI__ == '/' || in_array(__URL__[0], ['index', 'route']))
|
||||
Root::url('/main');
|
||||
elseif(file_exists(__CD__.__URL__[0].'.php'))
|
||||
require __CD__.__URL__[0].'.php';
|
||||
Reference in New Issue
Block a user