- 论坛徽章:
- 0
|
有3个页面
1.index.php
[php]<?php
session_cache_limiter('private,must-revalidate');
session_start();
require_once './include/common.inc.php'; //
require_once ROOT.'./bbs/config.inc.php'; //数据库连接文件
require_once ROOT.'./include/smarty/mysql.class.php'; //smarty模板引擎和类!?
require_once ROOT.'./include/smarty/smarty.class.php';
$db=new DB_SQL;
$db->connect($DB ,0);
unset($DB);
$smarty= new Smarty;
$smarty->template_dir = './templates/';
$smarty->compile_dir = './templates_cache/';
$smarty->left_delimiter = '<{';
$smarty->right_delimiter = '}>';
$PHP_SELF=$_SERVER['PHP_SELF'];
define("IN_WEB" ,1);
require_once ROOT.'./include/query.inc.php';
require_once ROOT.'./include/func.inc.php';
require_once ROOT.'./include/global.inc.php';
$session_id=session_id();
$smarty->assign(array("PHP_SELF"=>$PHP_SELF,"WebTitle"=>$comname));
switch($N) {
case "Register": require_once './modules/register.php'; break;
case "OnlineSige": require_once './modules/OnlineSige.php'; break;
default : require_once './modules/Main.php'; break;
}
?>[/php]
2.Main.php
[php]<?php
if(!defined("IN_WEB")) die("Access Denied!");
require_once("head.php");
$smarty->display("index.htm");
?>
[/php]
3.head.php
[php]<?php
if(!defined("IN_WEB")) die("Access Denied!");
$smarty->display("inc/head.htm");
?>[/php]
现在的问题是
我在 main.php中 想引用头部文件
但是 读取出来的页面 只有头部 没有 index.htm页
要如何解决呢!? |
|