Nextrek
Diff Revisions
506
vs
507
for /Android/SmartCharging/endPoints/add_immagini.php
|
@@ -4,8 +4,8 @@ |
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 |
9 |
|
|
10 |
10 |
|
$servername = "localhost"; |
11 |
11 |
|
$username = "smartcharging"; |
|
@@ -41,9 +41,9 @@ |
41 |
41 |
|
|
42 |
42 |
|
if (count($imgs)) { |
43 |
43 |
|
foreach($imgs as $image) { |
44 |
|
- |
rename("./images/temp/".session_id()."/".$image, "./images/".$image); |
|
44 |
+ |
rename($_SERVER['DOCUMENT_ROOT'].TEMP_IMAGES_PATH.session_id()."/".$image, $_SERVER['DOCUMENT_ROOT'].IMAGES_PATH.$image); |
45 |
45 |
|
} |
46 |
|
- |
rmdir("./images/temp/".session_id()."/"); |
|
46 |
+ |
rmdir($_SERVER['DOCUMENT_ROOT'].TEMP_IMAGES_PATH.session_id()."/"); |
47 |
47 |
|
} |
48 |
48 |
|
|
49 |
49 |
|
$risposta["return"] = $repo->addImages($params["id"], $imgs); |