Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[求助] 用smarty 和PHP做的新闻发布系统 美化界面后无法正常显示

[复制链接]
兔兔啊兔兔 发表于 2011-7-24 23:58:32 | 显示全部楼层 |阅读模式
问题描述
适用版本: Discuz! X2
浏览器: IE6 
使用模板: 其他模板(请在回帖中说明模板的名称或者是模板的下载地址)
BUG地址: http://www.catwooo.com
原来是可以的
原来的代码是
index.php
<?php
require_once("init.php");
require_once("class/news.class.php");
$news=new News;
$newslist=$news-> getNewses(1,8);
$smarty->assign('newslist',$newslist['data']);
$smarty->display("index.html");
?>


index.html的代码是


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link type="text/css" rel="stylesheet" href="css/web.css"/>
</head>
<body>
<div id="wrapper">
{include file="header.html"}
<div id="main">
  <div id="newsflash">
    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="380" height="285">
            <param name="movie" value="viewer.swf" />
            <param name="quality" value="high" />
            <embed src="viewer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="380" height="285"></embed>
       </object>
  </div>
  <div id="newslist">
   <h2><label>News</label>南华信息新闻</h2>
   <ul>
   {foreach from=$newslist item=news}
    <li class="{cycle values="odd,even"}"><a href="news.php?nid={$news.nid}">{$news.ntitle}</a></li>
   {/foreach}
   </ul>
   <div class="pagenav"><a href="#">首页</a><a href="#">上一页</a><a href="#">下一页</a><a href="#">未页</a></div>
  </div>
</div>
{include file="footer.html"}
</div>
</body>
</html>

 楼主| 兔兔啊兔兔 发表于 2011-7-24 23:59:11 | 显示全部楼层
后来修改了 index.html之后的代码是
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>index.gif</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">td img {display: block;}</style>
<!--Fireworks 8 Dreamweaver 8 target.  Created Mon Jul 25 22:20:08 GMT+0800 2011-->
</head>
<body bgcolor="#ffffff">
<div align="center">
  <table border="0" cellpadding="0" cellspacing="0" width="1024">
    <!-- fwtable fwsrc="main.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "50668100" fwnested="0" -->
    <tr>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="16" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="8" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="12" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="17" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="30" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="6" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="19" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="43" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="11" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="9" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="45" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="13" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="23" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="698" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="22" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="52" height="1" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
    </tr>
   
    <tr>
      <td colspan="16"><img src="http://localhost/smartynews/images/spacer.gif" width="1024" height="122" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="122" border="0" alt="" /></td>
    </tr>
    <tr>
      <td colspan="13"><img name="http://localhost/smartynews/images/index_r2_c1" src="http://localhost/smartynews/images/index_r2_c1.gif" width="252" height="11" border="0" id="http://localhost/smartynews/images/index_r2_c1" alt="" /></td>
      <td rowspan="12"><object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="698" height="285">
        <param name="movie" value="viewer.swf" />
        <param name="quality" value="high" />
        <embed src="viewer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="698" height="285"></embed>
      </object></td>
      <td rowspan="15"><img name="http://localhost/smartynews/images/index_r2_c15" src="http://localhost/smartynews/images/index_r2_c15.gif" width="22" height="463" border="0" id="http://localhost/smartynews/images/index_r2_c15" alt="" /></td>
      <td rowspan="16"><img src="http://localhost/smartynews/images/spacer.gif" width="52" height="1055" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="11" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="14"><img name="http://localhost/smartynews/images/index_r3_c1" src="http://localhost/smartynews/images/index_r3_c1.gif" width="16" height="452" border="0" id="http://localhost/smartynews/images/index_r3_c1" alt="" /></td>
      <td colspan="11"><img name="http://localhost/smartynews/images/index_r3_c2" src="http://localhost/smartynews/images/index_r3_c2.gif" width="213" height="11" border="0" id="http://localhost/smartynews/images/index_r3_c2" alt="" /></td>
      <td rowspan="12"><img name="http://localhost/smartynews/images/index_r3_c13" src="http://localhost/smartynews/images/index_r3_c13.gif" width="23" height="299" border="0" id="http://localhost/smartynews/images/index_r3_c13" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="11" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="9"><img name="http://localhost/smartynews/images/index_r4_c2" src="http://localhost/smartynews/images/index_r4_c2.gif" width="8" height="126" border="0" id="http://localhost/smartynews/images/index_r4_c2" alt="" /></td>
      <td colspan="6"><img name="http://localhost/smartynews/images/index_r4_c3" src="http://localhost/smartynews/images/index_r4_c3.gif" width="127" height="30" border="0" id="http://localhost/smartynews/images/index_r4_c3" alt="" /></td>
      <td rowspan="2" colspan="4"><img name="http://localhost/smartynews/images/index_r4_c9" src="http://localhost/smartynews/images/index_r4_c9.gif" width="78" height="36" border="0" id="http://localhost/smartynews/images/index_r4_c9" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="30" border="0" alt="" /></td>
    </tr>
    <tr>
      <td colspan="6"><img name="http://localhost/smartynews/images/index_r5_c3" src="http://localhost/smartynews/images/index_r5_c3.gif" width="127" height="6" border="0" id="http://localhost/smartynews/images/index_r5_c3" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="6" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="5" colspan="3"><img name="http://localhost/smartynews/images/index_r6_c3" src="http://localhost/smartynews/images/index_r6_c3.gif" width="59" height="61" border="0" id="http://localhost/smartynews/images/index_r6_c3" alt="" /></td>
      <td colspan="4"><img name="http://localhost/smartynews/images/index_r6_c6" src="http://localhost/smartynews/images/index_r6_c6.gif" width="79" height="24" border="0" id="http://localhost/smartynews/images/index_r6_c6" alt="" /></td>
      <td rowspan="5"><img name="http://localhost/smartynews/images/index_r6_c10" src="http://localhost/smartynews/images/index_r6_c10.gif" width="9" height="61" border="0" id="http://localhost/smartynews/images/index_r6_c10" alt="" /></td>
      <td rowspan="3"><img name="http://localhost/smartynews/images/index_r6_c11" src="http://localhost/smartynews/images/index_r6_c11.gif" width="45" height="46" border="0" id="http://localhost/smartynews/images/index_r6_c11" alt="" /></td>
      <td rowspan="7"><img name="http://localhost/smartynews/images/index_r6_c12" src="http://localhost/smartynews/images/index_r6_c12.gif" width="13" height="90" border="0" id="http://localhost/smartynews/images/index_r6_c12" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="24" border="0" alt="" /></td>
    </tr>
    <tr>
      <td colspan="4"><img name="http://localhost/smartynews/images/index_r7_c6" src="http://localhost/smartynews/images/index_r7_c6.gif" width="79" height="5" border="0" id="http://localhost/smartynews/images/index_r7_c6" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="5" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="2" colspan="4"><img name="http://localhost/smartynews/images/index_r8_c6" src="http://localhost/smartynews/images/index_r8_c6.gif" width="79" height="24" border="0" id="http://localhost/smartynews/images/index_r8_c6" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="17" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="4"><img name="http://localhost/smartynews/images/index_r9_c11" src="http://localhost/smartynews/images/index_r9_c11.gif" width="45" height="44" border="0" id="http://localhost/smartynews/images/index_r9_c11" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="7" border="0" alt="" /></td>
    </tr>
    <tr>
      <td colspan="4"><img name="http://localhost/smartynews/images/index_r10_c6" src="http://localhost/smartynews/images/index_r10_c6.gif" width="79" height="8" border="0" id="http://localhost/smartynews/images/index_r10_c6" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="8" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="2"><img name="http://localhost/smartynews/images/index_r11_c3" src="http://localhost/smartynews/images/index_r11_c3.gif" width="12" height="29" border="0" id="http://localhost/smartynews/images/index_r11_c3" alt="" /></td>
      <td colspan="3"><img name="http://localhost/smartynews/images/index_r11_c4" src="http://localhost/smartynews/images/index_r11_c4.gif" width="53" height="11" border="0" id="http://localhost/smartynews/images/index_r11_c4" alt="" /></td>
      <td rowspan="2"><img name="http://localhost/smartynews/images/index_r11_c7" src="http://localhost/smartynews/images/index_r11_c7.gif" width="19" height="29" border="0" id="http://localhost/smartynews/images/index_r11_c7" alt="" /></td>
      <td colspan="3"><img name="http://localhost/smartynews/images/index_r11_c8" src="http://localhost/smartynews/images/index_r11_c8.gif" width="63" height="11" border="0" id="http://localhost/smartynews/images/index_r11_c8" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="11" border="0" alt="" /></td>
    </tr>
    <tr>
      <td colspan="3"><img name="http://localhost/smartynews/images/index_r12_c4" src="http://localhost/smartynews/images/index_r12_c4.gif" width="53" height="18" border="0" id="http://localhost/smartynews/images/index_r12_c4" alt="" /></td>
      <td colspan="3"><img name="http://localhost/smartynews/images/index_r12_c8" src="http://localhost/smartynews/images/index_r12_c8.gif" width="63" height="18" border="0" id="http://localhost/smartynews/images/index_r12_c8" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="18" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="2" colspan="11"><img name="http://localhost/smartynews/images/index_r13_c2" src="http://localhost/smartynews/images/index_r13_c2.gif" width="213" height="162" border="0" id="http://localhost/smartynews/images/index_r13_c2" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="143" border="0" alt="" /></td>
    </tr>
    <tr>
      <td><img name="http://localhost/smartynews/images/index_r14_c14" src="http://localhost/smartynews/images/index_r14_c14.gif" width="698" height="19" border="0" id="http://localhost/smartynews/images/index_r14_c14" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="19" border="0" alt="" /></td>
    </tr>
    <tr>
      <td rowspan="2" colspan="2"><img name="http://localhost/smartynews/images/index_r15_c2" src="http://localhost/smartynews/images/index_r15_c2.gif" width="20" height="153" border="0" id="http://localhost/smartynews/images/index_r15_c2" alt="" /></td>
      <td colspan="11"><img name="http://localhost/smartynews/images/index_r15_c4" src="http://localhost/smartynews/images/index_r15_c4.gif" width="914" height="36" border="0" id="http://localhost/smartynews/images/index_r15_c4" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="36" border="0" alt="" /></td>
    </tr>
    <tr>
      <td><img name="http://localhost/smartynews/images/index_r16_c4" src="http://localhost/smartynews/images/index_r16_c4.gif" width="17" height="117" border="0" id="http://localhost/smartynews/images/index_r16_c4" alt="" /></td>
      <td colspan="10"><ul>
        {foreach from=$newslist item=news}
        <li class="{cycle values="odd,even"}"><a href="news.php?nid={$news.nid}">{$news.ntitle}</a></li>
        {/foreach}
        </ul></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="117" border="0" alt="" /></td>
    </tr>
    <tr>
      <td colspan="15"><img src="http://localhost/smartynews/images/spacer.gif" width="972" height="592" border="0" alt="" /></td>
      <td><img src="http://localhost/smartynews/images/spacer.gif" width="1" height="592" border="0" alt="" /></td>
    </tr>
  </table>
</div>

{foreach from=$newslist item=news} {$news.ntitle}

{/foreach}

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="698" height="285">
        <param name="movie" value="viewer.swf" />
        <param name="quality" value="high" />
        <embed src="viewer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="698" height="285"></embed>
      </object>
</body>
</html>
回复

使用道具 举报

 楼主| 兔兔啊兔兔 发表于 2011-7-25 00:00:23 | 显示全部楼层
其实也就两块。。一个FLASH 和一个新闻 发布 ,改了之后在服务器打开 发现是一片空白,可能是根本没载入。。但我也不清楚问题在哪里。
回复

使用道具 举报

幽壑潜蛟 发表于 2014-5-21 17:51:26 | 显示全部楼层
可能你需要检测一下你初始加载的那些初始化类跟DZ自己的初始化类有没有冲突。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-23 10:25 , Processed in 0.026556 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表