Добавлен тестовый PHP скрипт для диагностики

- test.php - простейший скрипт без зависимостей
- Временно переключена форма на test.php
- Покажет работает ли PHP, структуру файлов и POST данные
- Поможет диагностировать проблему с send_plan_simple.php
This commit is contained in:
Kirik
2025-09-03 15:19:48 +02:00
parent bf1c7e5d02
commit f1e03c20f8
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -120,7 +120,7 @@ disableComments = true
submitBtn.textContent = 'Отправляем...'; submitBtn.textContent = 'Отправляем...';
submitBtn.disabled = true; submitBtn.disabled = true;
fetch('/api/send_plan_simple.php', { fetch('/api/test.php', {
method: 'POST', method: 'POST',
body: formData body: formData
}) })
+25
View File
@@ -0,0 +1,25 @@
<?php
/**
* Простейший тест PHP на сервере
*/
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
$response = [
'status' => '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);
?>