Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 求大神破了他,我打开自己的网站,跳到别的网站去了

[复制链接]
as248199574 发表于 2015-2-26 08:45:23 | 显示全部楼层 |阅读模式
?php

//error_reporting(0);
set_magic_quotes_runtime(1);
$mtime = explode(' ', microtime());
$discuz_starttime = $mtime[1] + $mtime[0];

define('SYS_DEBUG', FALSE);
define('HSK_ROOT', substr(dirname(__FILE__), 0, -7));
define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
define('IMGDIR', "images/default/");
!defined('CURSCRIPT') && define('CURSCRIPT', '');

if($_SERVER['SERVER_NAME'] != 'www.94apt.com'){
        $url = "http://www.94apt.com".$_SERVER['REQUEST_URI'];
        header("locationurl");
        die();
}

if(PHP_VERSION < '4.1.0') {
        $_GET = &$HTTP_GET_VARS;
        $_POST = &$HTTP_POST_VARS;
        $_COOKIE = &$HTTP_COOKIE_VARS;
        $_SERVER = &$HTTP_SERVER_VARS;
        $_ENV = &$HTTP_ENV_VARS;
        $_FILES = &$HTTP_POST_FILES;
}

require_once HSK_ROOT.'./include/global.func.php';

if(defined('NOROBOT') && ISROBOT) {
        exit(header("HTTP/1.1 403 Forbidden"));
}

foreach(array('_COOKIE', '_POST', '_GET') as $_request) {
        foreach($$_request as $_key => $_value) {
                $_key{0} != '_' && $$_key = daddslashes($_value);
        }
}

$_DCOOKIE = $_DSESSION = $_DCACHE = $_DPLUGIN = $advlist = array();
$charset = $dbcharset = $forumfounders = $metakeywords = $extrahead = $seodescription = '';

require_once HSK_ROOT.'./config.inc.php';

$GLOBALS['debug'] = 1;
$prelength = strlen($cookiepre);
foreach($_COOKIE as $key => $val) {
        if(substr($key, 0, $prelength) == $cookiepre) {
                $scook = substr($key, $prelength);
                $$scook = MAGIC_QUOTES_GPC ? $val : daddslashes($val);
        }
}
unset($prelength, $_request, $_key, $_value, $scook);

$timestamp = time();
$saytime = gmdate('Y-m-d H:i', $timestamp+8*3600);

//*数据库连接
if($opensql){
        require_once HSK_ROOT.'./include/db_'.$database.'.class.php';
        $db = new dbstuff;
        $db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect);
        $dbuser = $dbpw = $dbname = $pconnect = NULL;
}
//*//数据库连接结束

$cachelost = (@include HSK_ROOT.'./forumdata/cache/cache_settings.php') ? '' : 'settings';
@extract($_DCACHE['settings']);

if($gzipcompress && function_exists('ob_gzhandler')) {
        ob_start('ob_gzhandler');
} else {
        $gzipcompress = 0;
        ob_start();
}
define('FORMHASH', formhash());

if(PHP_VERSION > '5.1') {
        @date_default_timezone_set('Etc/GMT'.($timeoffset > 0 ? '-' : '+').(abs($timeoffset)));
}

$myself = (substr($_SERVER["HP_SELF"], strrpos($_SERVER["HP_SELF"], "/")+1));

if($bbclosed && $myself != 'admincp.php'){
        showmessage("站点目前处于关闭状态,请稍候再来访问!");
}

?>

12581378 发表于 2015-2-26 11:23:12 | 显示全部楼层
  1. if($_SERVER['SERVER_NAME'] != 'www.94apt.com'){
  2.         $url = "http://www.94apt.com".$_SERVER['REQUEST_URI'];
  3.         header("locationurl");
  4.         die();
  5. }
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-15 17:28 , Processed in 0.023965 second(s), 6 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表