ecshop暂时关闭后管理员可查看页面的方法

时间:2016-05-1763举报小编:admin

    ecshop本身具备暂时关闭网站的功能,并可以自定义关闭的公告。那么ecshop暂时关闭后管理员如何可以查看页面呢?
    打开 /includes/init.php 文件
    找到(约122行)
    if ($_CFG['shop_closed'] == 1)  
    {  
        /* 商店关闭了,输出关闭的消息 */  
        header('Content-type: text/html; charset='.EC_CHARSET);  
        die('
    ' . $_LANG['shop_closed'] . '' . $_CFG['close_comment'] . '

    ');  
    }

    修改为
    if ($_CFG['shop_closed'] == 1)  
    {  
        /* 商店关闭了,输出关闭的消息 */  
        if (!isset($_SESSION['admin_name']))  
        {  
            header('Content-type: text/html; charset='.EC_CHARSET);  
            die('

    ' . $_LANG['shop_closed'] . '

    ' . $_CFG['close_comment'] . '


    ');      
        }  
    }