Nextrek
Diff Revisions
415
vs
517
for /Android/SmartCharging/endPoints/nightly/get_info_small_locale.php
|
@@ -2,11 +2,13 @@ |
2 |
2 |
|
header("Access-Control-Allow-Origin: *"); |
3 |
3 |
|
header('Content-Type: application/json; charset=UTF-8'); |
4 |
4 |
|
|
|
5 |
+ |
require_once("constants.php"); |
|
6 |
+ |
|
5 |
7 |
|
require_once("repositories/LocalRepository.php"); |
6 |
8 |
|
|
7 |
|
- |
$servername = "localhost"; |
|
9 |
+ |
/*$servername = "localhost"; |
8 |
10 |
|
$username = "smartcharging"; |
9 |
|
- |
$password = "LXRLBaEAuRr7M7jY"; |
|
11 |
+ |
$password = "LXRLBaEAuRr7M7jY";*/ |
10 |
12 |
|
|
11 |
13 |
|
//$params = json_decode($_REQUEST["params"], true); |
12 |
14 |
|
|
|
@@ -19,7 +21,7 @@ |
19 |
21 |
|
$local; |
20 |
22 |
|
|
21 |
23 |
|
try { |
22 |
|
- |
$conn = new PDO("mysql:host=".$servername.";dbname=smartcharging", $username, $password); |
|
24 |
+ |
$conn = new PDO("mysql:host=".DB_SERVERNAME.";dbname=".DB_NAME, DB_USERNAME, DB_PASSWORD); |
23 |
25 |
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
24 |
26 |
|
//echo "Connesso con successo al DB"; |
25 |
27 |
|
|