diff --git a/content/plan.md b/content/plan.md index 78eb0ee..03abf4a 100755 --- a/content/plan.md +++ b/content/plan.md @@ -120,7 +120,7 @@ disableComments = true submitBtn.textContent = 'Отправляем...'; submitBtn.disabled = true; - fetch('/api/send_plan_simple.php', { + fetch('/api/test.php', { method: 'POST', body: formData }) diff --git a/static/api/test.php b/static/api/test.php new file mode 100644 index 0000000..5d4ba96 --- /dev/null +++ b/static/api/test.php @@ -0,0 +1,25 @@ + 'PHP работает!', + 'timestamp' => date('Y-m-d H:i:s'), + 'php_version' => phpversion(), + 'current_dir' => __DIR__, + 'files' => [], + 'post_data' => $_POST +]; + +// Проверяем файлы в директории +if (is_dir(__DIR__)) { + $files = scandir(__DIR__); + $response['files'] = array_diff($files, ['.', '..']); +} + +echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); +?> \ No newline at end of file