时间:2023-08-29 10:24:01 | 来源:网站运营
时间:2023-08-29 10:24:01 来源:网站运营
PHP 织梦系统首页动态化实现:一、将根目录下的index.php代码做出如下替换<span style="font-size:14px;"><span style="font-family:tahoma,geneva,sans-serif;"><?phpif(!file_exists(dirname(__FILE__).'/data/common.inc.php')){ header('Location:install/index.php'); exit();}require_once (dirname(__FILE__) . "/include/common.inc.php");require_once DEDEINC."/arc.partview.class.php";$GLOBALS['_arclistEnv'] = 'index';$row = $dsql->GetOne("Select * From `dede_homepageset`");$row['templet'] = MfTemplet($row['templet']);$pv = new PartView();$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);$pv->Display();?></span></span>
二、配置伪静态RewriteRule ^index.html$ /index.php [L]
如果是Nginx环境的则打开伪静态文件nginx.htaccess 加入伪静态规则:rewrite "^/index.html$" /index.php last;
通过以上简单的两步配置即可实现织梦系统的首页动态化设置关键词:动态,实现,系统