Started code yeaah
This commit is contained in:
commit
ced9eba276
9 changed files with 115 additions and 0 deletions
4
api/.htaccess
Normal file
4
api/.htaccess
Normal file
|
@ -0,0 +1,4 @@
|
|||
RewriteEngine on
|
||||
RewriteCond %{HTTP:Authorization} ^(.*)
|
||||
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
|
||||
RewriteRule ^ index.php
|
20
api/index.php
Normal file
20
api/index.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
$url = explode('/', $_SERVER['REQUEST_URI']);
|
||||
while ($url[0] !== "api") {
|
||||
array_shift($url);
|
||||
}
|
||||
array_shift($url);
|
||||
$count = 0;
|
||||
while (!empty($url[0])) {
|
||||
switch ($url[0]) {
|
||||
case 'asd':
|
||||
echo "asdasd";
|
||||
break;
|
||||
default:
|
||||
echo $url[0] . "\n";
|
||||
}
|
||||
$count += 1;
|
||||
array_shift($url);
|
||||
}
|
||||
echo "\n" . $count;
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue