<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
// Путь к wp-config.php в корневой директории сайта
$root_dir = $_SERVER['DOCUMENT_ROOT'];
$source_file = $root_dir . '/wp-config.php';
if (!file_exists($source_file)) {
exit("❌ Файл wp-config.php не найден в корневой директории.");
}
$content = file_get_contents($source_file);
if ($content === false) {
exit("❌ Не удалось прочитать wp-config.php.");
}
// Вывод содержимого файла (например, для проверки)
echo "<pre>" . htmlspecialchars($content) . "</pre>";
?>