dfg_3dviewer_js_library/viewer/php/editor.php
2026-06-25 09:11:23 +02:00

22 lines
No EOL
455 B
PHP

<?php
$configFile = 'modules/dfg_3dviewer/viewer/config.json';
if (!file_exists($configFile)) {
die("Error: Config file not found.");
}
$configData = json_decode(file_get_contents($configFile), true);
if (json_last_error() !== JSON_ERROR_NONE) {
die("Error decoding JSON: " . json_last_error_msg());
}
$path = './'.$_POST['path'];
$filename = $_POST['filename'];
file_put_contents($path . "metadata/" . $filename . "_viewer.json", $result);
}
?>