急急!!session问题

急急!!session问题

本人在做登陆时使用session,传到服务器上后登陆跳到框架页无法获得session,框架页中无法找到该页,怎么解决?
代码如下:
登陆页:<?php
include_once("../lib/CSession.php");
include_once("../ini/system.ini");
include_once("../lib/conn.php");
include_once("../lib/CJavaScript.php");
include_once("../lib/CLogin.php");
$CSession =  new CSession;
$CJavaScript =  new CJavaScript;
$CLogin =  new CLogin;
$action="index.php";
$filename="login.tpl";
$file=file_get_contents($filename);
echo $row=str_replace("{TPL_LOGIN_SUBMIT}","$action","$file");
if($_POST){
$username=$_POST['name'];
$pwd=$_POST['password'];
$sql=mysql_query("SELECT * FROM "._MYSQL_DB_TABLE."users WHERE u_name='$username' AND u_pwd='$pwd'");
if($aRow =mysql_fetch_array($sql)){
                session_start();
                $_SESSION['username']=$aRow['u_name'];
                $CSession->vSetVar("gUserId",$aRow['u_id']);
                $CJavaScript->vUpdateThisFrame("admin.php");
                exit;
                }
}
?>
admin页:
<?php
session_start();
if(isset($_SESSION['username']))
{
$filename="main.htm";
echo $file=file_get_contents($filename);
}else{
echo "<script>alert('您沒有權限訪問本頁!!!');window.location.href='index.php';</script>";
}

?>
main.htm为框架页:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>MyCOM企业网站管理系统</title>
</head>
        <frameset rows="76,*" cols="*" frameborder="no" border="0" framespacing="0" >
                <frame src="top.php" name="mcTopFrame" id="mcTopFrame" scrolling="no" noresize>
                <frameset cols="176,*" name="mcBodyFrame" id="mcBodyFrame" frameborder="no" border="0" framespacing="0"  >
                        <frame src="menu.php" name="mcMenuFrame" id="mcMenuFrame" scrolling="no" noresize>
                        <frame src="main.php" name="mcMainFrame" id="mcMainFrame" scrolling="auto" noresize>
                </frameset>
        </frameset>
        <noframes>
                <body>很遗憾,你的浏览器不支持框架。</body>
        </noframes>
</html>
其中top.php:
<?php
$filename="top.tpl";
$file=file_get_contents($filename);
echo $row=str_replace("{TPL_ADMIN_NAME}",$_SESSION['username'],$file);
}
?>
服务器的相关配置如下:
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
服務器操作系統 Linux

[ 本帖最后由 ll209 于 2008-12-27 09:50 编辑 ]

en o