LyfUpload 错误 '800a0009' 下标越界 大家快来忙看一下

zhy0771 2005-10-11 01:32:31
报错
LyfUpload 错误 '800a0009'

下标越界

/JCHOUSE/news/news_admin/hot_edit.asp,行15


源程序:

<!--
*****************************************************************
*功能描述:热点聚焦信息修改页面
*作者:周会园
*完成日期:2005/10/10
*****************************************************************
-->
<!--#Include File="../include/xf_checkadmin.inc"-->
<!--#Include File="../include/conn.inc"-->
<%

If Request("hotedit")="edit" Then
'--------------------获取表单值----------------------'
Set obj = Server.CreateObject("LyfUpload.UploadFile")
Hot_Title=Server.HTMLEncode(Replace(Trim(obj.Request("title")),"'","''"))
Hot_InfoSource=Server.HTMLEncode(Replace(Trim(obj.Request("Source")),"'","''"))
Hot_Import=Server.HTMLEncode(Replace(Trim(obj.Request("Import")),"'","''"))
Hot_Img=Server.HTMLEncode(Replace(Trim(obj.Request("Hot_Img")),"'","''"))
Hot_Chk=Server.HTMLEncode(Replace(Trim(obj.Request("Hot_Chk")),"'","''"))
Hot_Content=Server.HTMLEncode(Replace(Trim(obj.Request("Hot_Content")),"'","''"))
Hot_Date=now()
ID=Request("editid")

If Hot_Chk=1 then
'--------------------利用上传组件进行图片上传-----------------------'
obj.maxsize=307200 '设置文件上传的最大为307200个字节(300K)
obj.extname="gif,jpg"
'设置上传文件的相对路径
Path=server.mappath("../upload_img")
Set fs = CreateObject("Scripting.FileSystemObject")
'判断是否存在此文件夹,不存在,创建该文件夹
If not fs.FolderExists(path) Then
fs.createfolder(path)
End If

'保存文件到服务器,flase表示文件不覆盖
ss=obj.SaveFile("Hot_Img",path, false)
If ss= "0" Then
Response.Write "<script language=javascript>"
Response.Write "alert('图片尺寸过大!');"
Response.Write "history.go(-1)"
Response.Write "</script>"
Response.End
ElseIf ss= "1" Then
Response.Write "<script language=javascript>"
Response.Write "alert('图片不是gif或jpg格式!');"
Response.Write "history.go(-1)"
Response.Write "</script>"
Response.End
ElseIf ss= "3" Then
Response.Write "<script language=javascript>"
Response.Write "alert('此图片名存在,请换名!');"
Response.Write "history.go(-1)"
Response.Write "</script>"
Response.End
End If
If ss<>"" Then
ss="../upload_img/"&ss
Else
ss=""
End If
End If
'--------------------更新记录----------------------'

Set Rs1=Server.Createobject("Adodb.Recordset")
Sql1="SELECT * FROM ZX_HOT where Hot_Id=" & ID
Rs1.open Sql1,conn,1,3
Rs1("Hot_Title")=Hot_Title
Rs1("Hot_InfoSource")=Hot_InfoSource
Rs1("Hot_Import")=Hot_Import
Rs1("Hot_Content")=Hot_Content
If Hot_Chk=1 then '判断复选框值如果是1则更新此字段
Rs1("Hot_Img")=Hot_Img
End if
Rs1("Hot_Date")=Hot_Date
Rs1.Update

Response.Write "<script language='javascript'>"
Response.Write "alert('修改完成,返回管理页!');"
Response.Write "location='hot_manage.asp';"
Response.Write "</script>"
Else
ID=Request.QueryString("ID")
Set Rs=Server.Createobject("Adodb.Recordset")
Sql="SELECT * FROM ZX_HOT where Hot_Id=" & ID
Rs.open Sql,conn,1,3
End if

%>
<Script Language="JavaScript">
function check_fir()
{
if(document.form1.Hot_Title.value=="")
{
alert("请填写信息标题!");
return false;
}
if (document.form1.Hot_InfoSource.value == "")
{
alert("请注明新闻来源!");
return (false);
}
if (document.form1.Hot_Import.value == "")
{
alert("请输入关键字!");
return (false);
}
document.form1.Hot_Content.value=document.form1.info_content.value;
}
</script>
<script language="JavaScript">
<!--
function loadForm()
{
document.form1.info_content.value=document.form1.Hot_Content.value;
return true
}
//-->
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../css/office.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" onload="loadForm()">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><br>
<font color="#FF0000">注</font>:1、请牢记您修改后的密码;
<p>2、在所有的信息录入页面中,带<font color="#FF0000"><strong>*</strong></font>号的必须填写;</p>
<p>3、为了您的网站安全性,请点击“<font color="#FF0000"><strong>安全退出</strong></font>”退出系统; </p></td>
</tr>
<tr>
<td><hr size="1" noshade></td>
</tr>
</table>
<table width="80%" cellspacing="1" cellpadding="5" bgcolor=#999999 align=center>
<form name="form1" method="post" action="hot_edit.asp?hotedit=edit&editid=<%=Rs("Hot_Id")%>" onSubmit="return check_fir()" enctype="multipart/form-data">
<tr align="center" bgcolor=ffcc00 height=20>
<td colspan="4"><strong>文 章 修 改</strong></td>
</tr>
<tr>
<td width="15%" bgcolor="#ffffff" >信息标题</td>
<td width="85%" colspan="3" bgcolor="#ffffff" ><input name="Hot_Title" type="text" size="80" value="<%=Rs("Hot_Title")%>">
<font color="#FF0000"><strong>*</strong></font> </td>
</tr>
<tr bgcolor=#ffffff>
<td>
信息来源</td>
<td colspan="3" bgcolor="#ffffff" ><input name="Hot_InfoSource" type="text" size="50" value="<%=Rs("Hot_InfoSource")%>">
<font color="#FF0000"><strong>*</strong></font> </td>
</tr>

<tr bgcolor=#ffffff>
<td>上传图片:</td>
<td colspan="3" bgcolor="#ffffff" ><input type="file" name="Hot_Img" style="width:300">
<input type="checkbox" name="Hot_Chk" value="Hot_Chk">
如果更新图片请在复选框里打勾</td>
</tr>
<tr bgcolor=#ffffff>
<td>关键字:</td>
<td colspan="3" bgcolor="#ffffff" ><input name="Hot_Import" type="text" size="50" value="<%=Rs("Hot_Import")%>">
<font color="#FF0000"><strong>*</strong></font></td>
</tr>
<tr bgcolor=#dddddd>
<td bgcolor="#FFFFFF">内容</td>
<td colspan="3" align="center" bgcolor="#FFFFFF" >
<object id=info_content type="text/x-scriptlet" data="../include/editor.html" width=550 height=380>
</object>
<input type="hidden" name="Hot_Content" value="<%=Rs("Hot_Content")%>" >
<br>
</td>
</tr>
<tr align="center" bgcolor=#ffffff>
<td colspan="4"><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</form>
</table>
</body>
</html>
...全文
185 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhurenweile 2005-10-11
  • 打赏
  • 举报
回复
值出现空值才会出现这样的错误
zhy0771 2005-10-11
  • 打赏
  • 举报
回复
22
itzhiren 2005-10-11
  • 打赏
  • 举报
回复
错误的哪一行是?

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧