Nextrek
Diff Revisions
249
vs
265
for /Android/SmartCharging/endPoints/add_commento.php
|
@@ -1,11 +1,17 @@ |
1 |
1 |
|
<?php |
|
2 |
+ |
header("Access-Control-Allow-Origin: *"); |
|
3 |
+ |
header('Content-Type: application/json; charset=UTF-8'); |
|
4 |
+ |
|
2 |
5 |
|
require_once("CommentRepository.php"); |
3 |
6 |
|
|
4 |
7 |
|
$servername = "localhost"; |
5 |
8 |
|
$username = "smartcharging"; |
6 |
9 |
|
$password = "LXRLBaEAuRr7M7jY"; |
7 |
10 |
|
|
8 |
|
- |
$params = json_decode($_REQUEST["params"], true); //da portare su POST la richiesta |
|
11 |
+ |
//$params = json_decode($_REQUEST["params"], true); |
|
12 |
+ |
|
|
13 |
+ |
//$input = file_get_contents('php://input'); |
|
14 |
+ |
$params = json_decode(file_get_contents('php://input'), true); |
9 |
15 |
|
|
10 |
16 |
|
$conn; |
11 |
17 |
|
//$risposta = array(); |