ecshop本身具备暂时关闭网站的功能,并可以自定义关闭的公告。那么ecshop暂时关闭后管理员如何可以查看页面呢?
打开 /includes/init.php 文件
找到(约122行)
if ($_CFG['shop_closed'] == 1"
{
header('Content-type: text/html; charset='.EC_CHARSET";
die('<div style="margin: 150px; text-align: center; font-size: 14px"><p>' . $_LANG['shop_closed'] . '</p><p>' . $_CFG['close_comment'] . '</p></div>'";
}
修改为
if ($_CFG['shop_closed'] == 1"
{
if (!isset($_SESSION['admin_name']""
{
header('Content-type: text/html; charset='.EC_CHARSET";
die('<div style="margin: 150px; text-align: center; font-size: 14px"><p>' . $_LANG['shop_closed'] . '</p><p>' . $_CFG['close_comment'] . '</p></div>'";
}
}



