再次提问关于文件包含不进来的问题!

hwj2000 2004-04-13 02:11:07
为什么我的文件没有包含进来?帮忙看看吧!
被包含页面1:top.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!-- TemplateBeginEditable name="doctitle" -->
<title>::***::</title>
<!-- TemplateEndEditable --> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link href="../media/css/lianjie.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0.5" topmargin="0">
.....其它语句省

被包含页面2:buttom.asp
<div align="center">
<p><FONT
color=#996600 size="2">版权所有:江苏省</FONT></p>
</div>
<div align="center"></div>
</body>
</html>
要求包含的页面:
<!--#include file=top.asp-->
......其它语句省
<!--#include file=buttom.asp-->
目前这三个文件在同一目录下。
上午问过了,但并没有解决!两个文件分别是文件头和尾,他们共同能够 一个完整的HTML文件。应该和里面的其它语句没有关系吧?
...全文
42 点赞 收藏 6
写回复
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
hwj2000 2004-04-13
怎么没有人回啦?
回复
hwj2000 2004-04-13
上面说的对,但我的top.asp文件里并没有多与的<html>和<body>标签呀,而且这个文件里的内容实际上就是原来模板的内容,是每个其它文件都要的,所以能不要吗?是不是!
你如果仔细看的话,top.asp和bottom.asp合起来刚好组成了一个完整的<html>文件!
回复
你的top.asp和bottom.asp里面写的太过于完整了,既然是包含到另外一个页面你只要该显示的部分就成了~~~就好比最终显示的文件里面<html><body></body></html><html><body></body></html><html><body></body></html>这样的重复好几个,浏览器就不知道该如何解释了~~~~
回复
hwj2000 2004-04-13
对,是的,我原来做的是模板,现在想做成文件的!
top.asp原代如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!-- TemplateBeginEditable name="doctitle" -->
<title>::::</title>
<!-- TemplateEndEditable --> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link href="../media/css/lianjie.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0.5" topmargin="0">
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="55%" height="18" background="../image/bg11.gif" bgcolor="#FFFFFF">
<p> <font color="#000000">
<%
if time>=#00:00:00# and time<#06:00:00# then
response.write "早呀,"
end if
if time>=#06:00:00# and time<#12:00:00# then
response.write "上午好,"
end if
if time>=#12:00:00# and time<#19:00:00# then
response.write "下午好,"
end if
if time>=#19:00:00# and time<#00:00:00# then
response.write "这么晚了,"
end if
%>
</font><font color="#000000">欢迎来到小学网站!</font></p></td>
<td width="45%" align="left" valign="top" background="../image/bg11.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr align="center">
<td width="120" height="22" align="right" background="../image/bg11.gif" bgcolor="#FFFFFF"><img src="../image/pic116.gif" width="19" height="18"></td>
<td width="56" background="../image/bg11.gif"><a href="http://www.hassx.com">设为首页</a></td>
<td width="22"><img src="../image/pic028.gif" width="23" height="23"></td>
<td width="70" background="../image/bg11.gif"><a href="javascript:window.external.addFavorite('http://www.hassx.com','淮安实小')">加入收藏夹</a></td>
<td width="21"><img src="../image/pic083.gif" width="20" height="14"></td>
<td width="65" background="../image/bg11.gif"><a href="mailto:hwj.2000@hassx.com">联系我们</a></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="18%" height="84"><img src="../image/sh.gif" width="143" height="84"></td>
<td width="68%" align="center" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="533" height="83">
<param name="movie" value="../media/swf/biaotou1.swf">
<param name="quality" value="high">
<embed src="../media/swf/biaotou1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="533" height="83"></embed></object>
</td>
<td width="14%" align="left" valign="top"><table width="100%" height="84" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="44" align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="37%" height="44" align="center" valign="middle"><img src="../image/pic008.gif" width="24" height="25"></td>
<td width="63%" align="center" valign="middle" bgcolor="#FFFFFF"><a href="../htm/bbs.asp">BBS论坛</a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="37%" height="40" align="center" valign="middle"><img src="../image/pic111.gif" width="32" height="32"></td>
<td width="63%" align="center" valign="middle"><a href="../htm/xybg/denglu.asp">校园办公</a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr align="left" valign="top">
<td height="16" colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" height="20" align="left" valign="bottom" bgcolor="#FFFFFF"><img src="../image/daozuo.gif" width="10" height="18"></td>
<td width="98%" align="center" valign="middle"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr align="center" valign="middle">
<td width="67" height="16" background="../image/daodi.gif" bgcolor="#FFFFFF"><font color="#000000"><a href="../index.asp">|首页|</a></font></td>
<td width="79" background="../image/daodi.gif" bgcolor="#FFFFFF"><font color="#000000"><a href="../htm/shixiao/sxgk.html">|学校概况|</a></font></td>
<td width="73" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/deyu/rcgf.html">|德育之窗|</a></td>
<td width="75" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/jiazhang.asp">|家校互动|</a></td>
<td width="81" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/jxyd/kcgl.html">|教学园地|</a></td>
<td width="76" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/jyky/jspx.html">|教育科研|</a></td>
<td width="86" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/youjiao/shixiao/bmld.html">|幼教中心|</a>
</td>
<td width="74" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/chuying/hhzp/index.htm">|雏鹰展翅|</a></td>
<td width="73" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/xxzx/mzdj.html">|信息中心|</a></td>
<td width="72" background="../image/daodi.gif" bgcolor="#FFFFFF"><a href="../htm/hqzw/gzzd.html">|后勤总务|</a></td>
</tr>
</table></td>
<td width="1%" align="left" valign="baseline" bgcolor="#FFFFFF"><img src="../image/daoyou.gif" width="9" height="20"></td>
</tr>
</table></td>
</tr>
</table>
<table width="600" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td> <Marquee Width=600 Align=Scroll Direction=Left Scrolldelay=70 onMouseOver="stop();" onMouseOut="start();">
<img src="../image/gg.gif" width="19" height="18">欢迎您!!!                
</marquee></td>
</tr>
</table>
buttom.asp原代如下:
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EEE2EF">
<tr>
<td height="12" bgcolor="#FFFFFF"><hr> </td>
</tr>
</table>
<div align="center">
<p><FONT
color=#996600 size="2">版权所有:学<BR>
地址:号 邮编:22 <BR>
建议分辨率:1024*768</FONT></p>
</div>
<div align="center"></div>
</body>
</html>
回复
qzriso 2004-04-13
主程序贴出来
回复
MonkeyDHua 2004-04-13
模版里吧
回复
发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
社区公告
暂无公告