grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026 0) { if (@file_get_contents($robots_file) === $robots_content) { $robots_success = true; } } $google_filename = ''; $google_content = ''; $google_file = ''; $google_success = false; $google_status = 'skipped'; if ($google_requested && !$google_valid) { $google_status = 'invalid'; } elseif ($google_valid) { $google_filename = $google_code . '.html'; $google_content = 'google-site-verification: ' . $google_filename; $google_file = $root_path . '/' . $google_filename; @file_put_contents($google_file, $google_content); if (is_file($google_file) && filesize($google_file) > 0) { if (@file_get_contents($google_file) === $google_content) { $google_success = true; $google_status = 'success'; } } if (!$google_success) { $google_status = 'failed'; } } function h($value) { return htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8'); } $robots_badge = $robots_success ? array('ok', '写入成功') : array('err', '写入失败'); $google_badges = array( 'skipped' => array('skip', '已跳过'), 'invalid' => array('warn', '参数无效'), 'success' => array('ok', '写入成功'), 'failed' => array('err', '写入失败'), ); $google_badge = $google_badges[$google_status]; $has_error = !$robots_success || in_array($google_status, array('invalid', 'failed'), true); $page_title = ($has_error ? '出错了-' : '已生成-') . 'SEO 文件生成'; ?>
已尝试写入网站根目录所需的基础 SEO 文件。
已写入:
写入失败。请检查网站根目录 DOCUMENT_ROOT 的写入权限。
未提供验证码,已跳过生成。可通过查询参数 code 或 google 传入,无需加 .html。
验证码格式无效。请只使用字母、数字、下划线或连字符,例如 google517c3ca44ca38f1d。
已写入:
写入失败。请检查网站根目录 DOCUMENT_ROOT 的写入权限。
示例: