From f1e03c20f89f892491eb7fe70e9a92099a20e2aa Mon Sep 17 00:00:00 2001 From: Kirik Date: Wed, 3 Sep 2025 15:19:48 +0200 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2=D1=8B=D0=B9=20PHP?= =?UTF-8?q?=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B4=D0=B8=D0=B0=D0=B3=D0=BD=D0=BE=D1=81=D1=82=D0=B8=D0=BA?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - test.php - простейший скрипт без зависимостей - Временно переключена форма на test.php - Покажет работает ли PHP, структуру файлов и POST данные - Поможет диагностировать проблему с send_plan_simple.php --- content/plan.md | 2 +- static/api/test.php | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 static/api/test.php 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