Nextrek
Diff Revisions
506
vs
507
for /Android/SmartCharging/endPoints/delete_immagine.php
|
@@ -4,8 +4,9 @@ |
4 |
4 |
|
header("Access-Control-Allow-Origin: *"); |
5 |
5 |
|
header('Content-Type: application/json; charset=UTF-8'); |
6 |
6 |
|
|
7 |
|
- |
require_once("LocalRepository.php"); |
8 |
|
- |
require_once("CommentRepository.php"); |
|
7 |
+ |
require_once("repositories/LocalRepository.php"); |
|
8 |
+ |
require_once("repositories/CommentRepository.php"); |
|
9 |
+ |
require_once("constants.php"); |
9 |
10 |
|
|
10 |
11 |
|
$servername = "localhost"; |
11 |
12 |
|
$username = "smartcharging"; |
|
@@ -39,7 +40,7 @@ |
39 |
40 |
|
|
40 |
41 |
|
$risposta["return"] = $repo->deleteImage($params["id"], $params["img"]); |
41 |
42 |
|
|
42 |
|
- |
unlink("./images/".$params["img"]); |
|
43 |
+ |
unlink($_SERVER['DOCUMENT_ROOT'].IMAGES_PATH.$params["img"]); |
43 |
44 |
|
|
44 |
45 |
|
} |
45 |
46 |
|
catch(PDOException $e) |