Файловый менеджер - Редактировать - /www/wwwroot/gamenworld.store/admin/adstxtset.php
�азад
<?php $page = "Set Ads.txt"; ?> <?php require "../app/includes/function_general.php"; ?> <?php include "includes/header.php"; ?> <?php if (!empty($_GET['token_id']) && isset($_GET['action'])) { $token_id = $_GET['token_id']; $action_type = $_GET['action']; } if (isset($token_id) && isset($action_type) && !empty($token_id)) { $sql = "SELECT * FROM zon_ads WHERE id=$token_id"; $run = mysqli_query($con, $sql); $data = mysqli_fetch_assoc($run); } // 设置文件路径 $ads_file = $_SERVER['DOCUMENT_ROOT'] . '/ads.txt'; // 读取文件内容 $ads_content = ''; if (file_exists($ads_file)) { $ads_content = file_get_contents($ads_file); } // 处理表单提交 if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['ads_content'])) { // 确保 POST 的 name 与表单中的 name 属性一致 $new_content = $_POST['ads_content']; // 保存文件 if (file_put_contents($ads_file, $new_content) !== false) { $ads_content = $new_content; } } } ?> <body> <main class="d-flex"> <?php include "includes/sidebar.php"; ?> <div class="main w-full px-12 py-6"> <div class="flex gap-6"> <div class="input-group flex flex-column mt-6"> <form method="post"> <label class="text-gray-500 uppercase text-[10px] mb-2" for="ads_content">ads.txt:</label> <textarea name="ads_content" class="outline-none px-2 dark:bg-zinc-900 py-2 focus:outline-blue-500 transition-sm text-gray-500 text-sm" cols="100" rows="20" id="ads_content"><?php echo htmlspecialchars($ads_content); ?></textarea> <br><br> <button class="bg-blue-600 text-white uppercase mt-4 text-sm rounded-sm py-2 px-3" type="submit">Save</button> <a href="/ads.txt" target="_blank" class="bg-blue-600 text-white uppercase mt-4 text-sm rounded-sm py-2 px-3">Check</a> </form> </div> </div> </div> </main> <?php include "includes/footer.php"; ?> </body>
| ver. 1.4 |
Github
|
.
| PHP 8.0.26 | Генераци� �траницы: 0 |
proxy
|
phpinfo
|
�а�тройка