|

|
jake您好,最近在做一个网站,制作起了后台,目录为ADMIN,在里面用到了FRAMESET分页,但是显示不出来内容,谢谢看一下
看下面代码,ADMIN/INDEX.PHP代码如下:
<?php
define("SP_PATH","../SpeedPHP");
define("APP_PATH",dirname(__FILE__));
$spConfig = array(
"db"=>array(
"host"=>"localhost",
"login"=>"root",
"password"=>"123456",
"database"=>"huixiao"
),
"view"=>array(
"enbled"=>true,
"config"=>array(
"template_dir"=>APP_PATH."/tpl",
"compile_dir"=>APP_PATH."/tmp",
"cache_dir"=>APP_PATH."/tmp",
"left_delimiter"=>"<{",
"right_delimiter"=>"}>",
),
),
'url' => array(
'url_path_base' => '/admin/index.php',
)
);
require(SP_PATH."/SpeedPHP.php");
spRun();
?>
main.php代码如下:
<?php
class main extends spController
{
function index(){
$this->display("index.html");
}
function menu(){
$this->display("menu.html");
}
function top(){
$this->dispaly("top.html");
}
}
?>
index.html代码如下:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>中国会销赠品网后台管理系统</title>
<style>
body
{
scrollbar-base-color:#C0D586;
scrollbar-arrow-color:#FFFFFF;
scrollbar-shadow-color EEFC6;
}
</style>
</head>
<frameset rows="60,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="<{spUrl c=main a=top}>" name="topFrame" scrolling="no">
<frameset cols="180,*" name="btFrame" frameborder="NO" border="0" framespacing="0">
<frame src="tpl/menu.html" noresize name="menu" scrolling="yes">
<frame src="tpl/main.html" noresize name="main" scrolling="yes">
</frameset>
</frameset>
<noframes>
<body>您的浏览器不支持框架!</body>
</noframes>
</html>
这样的目录下:top.html不能显示,但是我们要用SMARTY只能用<{spUrl c=main a=top}>访问MAIN.php才行呀!
我了试了您上传的那个DEMO能行,我以前也做过类似的东东,也行,但是以前都是在根目录下的,放在二级目录下怎么不行了呢 |
|