"success", "message" => "Saved " . $filenameNoRelativePath); } else { $response = array("status" => "error", "message" => "Invalid filename " . $filenameNoRelativePath); } header('Content-Type: application/json'); echo json_encode($response);