我的index什么也没有只有一句<?php 
include 'config.php';
include 'smarty.php';
$tpl->display("./templates/main.html");
这个用浏览器看,全是空白啊!
再我的main.html 中,调用了好几个网页,比如说 top.html left.html
框架include浏览器php

解决方案 »

  1.   


    就是说,index.php 调用了网页框架,怎么不显示呢
      

  2.   


    只恩呢该看到标题之类的就是 main.html的 标题等html的全部内容,但是main.html调用的别的网页一点没显示
    就是只有main.html自身的html语句被调用,其他的没有被第二次调用
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台管理工作平台</title>
    </head>
    <frameset rows="127,*,11" frameborder="no" border="0" framespacing="0">
    <frame src="top.html" name="topFrame" scrolling="No"
    noresize="noresize" id="topFrame" />
    <frame src="center.html" name="mainFrame" id="mainFrame" />
    <frame src="down.html" name="bottomFrame" scrolling="No"
    noresize="noresize" id="bottomFrame" />
    </frameset>
    <noframes>
    <body>
    </body>
    </noframes>
    </html>
      

  4.   


    所有的html都放在一个文件夹的,不用smarty是绝对没问题的,能正常的看是不是smarty 没有这个功能啊? smarty只能调用一次? 不能解析框架? 
      

  5.   

    那就不对了!
    你所有的页面都放在 templates 中,而你在框架又没有 templates/top.html
    差了一级 templates 目录,如何能正确显示呢?
      

  6.   

    我遇到了同样的问题。我做的后台管理系统使用了框架,用display(index.html)时,可以正常显示,可是我用$system_info['DOCUMENT_ROOT']=$_SERVER['DOCUMENT_ROOT'];
    $system_info['UPLOAD_MAX_FILESIZE']=@ini_get('upload_max_filesize');
    $smarty=new smarty();smarty_header();
    $smarty->assign('system_info',$system_info);
    这样的用在框加里面页面时,不启作用。框架里面有一个start.html页面,里面我插进的{system_info['DOCUMENT_ROOT']}不启作用。
      

  7.   

    楼上这个 应该是 {$system_info['DOCUMENT_ROOT']} 吧?smarty 用得不多,你试看看
      

  8.   

    应该直接跳转到整个框架集.html页面,你先前的总框架集已经包含了top.html,center.html,down.html
      

  9.   

    define('SMARTY_DIR','./Smarty/');  //必须最后一个斜杠
    require_once  SMARTY_DIR.'Smarty.class.php';