-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
25 lines (21 loc) · 728 Bytes
/
index.php
File metadata and controls
25 lines (21 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
header("Content-Type: application/json");
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
header("Allow: GET, POST, OPTIONS, PUT, DELETE");
require 'class.php';
if(!isset($_GET["id"])){
$prueba = new DB(
$_SERVER['REQUEST_METHOD'],
file_get_contents('php://input'),
false
);
}else{
$prueba = new DB(
$_SERVER['REQUEST_METHOD'],
file_get_contents('php://input'),
$_GET["id"]
);
}
?>