主题: 请问各路大侠一个上传图片的问题
作者: 路过者, 发布日期: 2011-08-09 02:15:41, 浏览数: 5116

请问各路大侠一个上传图片的问题

上传图片出现“服务器发生故障”。att的目录权限我都检查了,可以读写。

 

下面是网页的代码请问各路大侠不知写得对不对。

 

 

<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<%
dim iidd
iidd=Request("id")
BigClassName=Trim(Request("BigClassName"))
content=Request("content")
Aboutusorder=Request("Aboutusorder")
FilesUrl=Request("FilesUrl")
ClassName=Request("ClassName")
%>


<%if Request.QueryString("mark")="southidc" then%>
<%
If BigClassName="" Then
response.write "SORRY <br>"
response.write "请输入栏目名称!<a href=""javascript:history.go(-1)"">返回重输</a>"
response.end
end if

If Aboutusorder="" Then
response.write "SORRY <br>"
response.write "请输入排序号!<a href=""javascript:history.go(-1)"">返回重输</a>"
response.end
end if

If Content="" Then
response.write "SORRY <br>"
response.write "请输入栏目内容!<a href=""javascript:history.go(-1)"">返回重输</a>"
response.end
end if

Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from Aboutus where ID="&iidd

rs.Open sql,conn,1,3
rs("BigClassName")=BigClassName
rs("Content")=Content
rs("Aboutusorder")=Aboutusorder
rs("FilesUrl")=FilesUrl
rs("ClassName")=ClassName
rs.update
rs.close
response.redirect "AdminAboutus.asp?ClassName="&ClassName
end if
%>
<%
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from Aboutus where ID="&iidd
rs.Open sql,conn,1,3
%>
<!-- #include file="Inc/Head.asp" -->
<script charset="utf-8" src="edito/kindeditor.js"></script>
<script type="text/javascript">
KE.show({
id : 'content',
imageUploadJson : 'edito/asp/upload_json.asp',
fileManagerJson : 'edito/asp/file_manager_json.asp',
allowFileManager : true,
afterCreate : function(id) {
KE.event.ctrl(document, 13, function() {
KE.util.setData(id);
document.forms['myform'].submit();
});
KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
KE.util.setData(id);
document.forms['myform'].submit();
});
}
});
</script>

<form name="myform" method="post" action="AdminAboutusModify.asp?mark=southidc">
<table width="600" border="0" align="center" cellpadding="4" cellspacing="1" class="table_southidc">
<tr bgcolor="#E7E7E7">
<td height="30" colspan="4" align="center" bgcolor="#FFFFFF" class="back_southidc" style="font-weight: bold">管理</td>
</tr>
<tr bgcolor="#E7E7E7">
<td width="13%" height="25" align="right" bgcolor="#FFFFFF">名称: </td>
<td width="45%" bgcolor="#FFFFFF"><input name=BigClassName class=inputtext value="<%=rs("BigClassName")%>" size=25 maxlength=30></td>
<td width="25%" height="25" align="right" bgcolor="#FFFFFF">排序号(请勿随意修改): </td>
<td width="17%" height="25" bgcolor="#FFFFFF"><input name=Aboutusorder id=Aboutusorder value="<%=rs("Aboutusorder")%>" size=4>
<input type="hidden" name="id" value="<%=iidd%>">
<input type="hidden" name="ClassName" value="<%=ClassName%>"> </td>
</tr>
<tr align="center" bgcolor="#E7E7E7">
<td height="25" colspan="4" bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="12%" align="center">图片:</td>
<td height="21"><input name="FilesUrl" type="text" id="FilesUrl" value="<%=rs("FilesUrl")%>" size="30" maxlength="50">
<input name="PhotoSize7" type="text" id="PhotoSize7" size="8" readonly style="display:none " ></td>
<td><iframe style="top:2px" ID="UploadFiles" src="Upfile/upload_Photo.asp?PhotoUrlID=7" frameborder=0 scrolling=no width="300" height="25"></iframe></td>
<input type="hidden" id=classname2 size=4 name=classname2 value="<%=classname%>" >
</tr>
</table></td>
</tr>
<tr align="center" bgcolor="#E7E7E7">
<td height="25" colspan="4" bgcolor="#FFFFFF">栏目内容 </td>
</tr>
<tr bgcolor="#E7E7E7">
<td height="25" colspan="4" bgcolor="#FFFFFF"><div align="center">
<div align=center>
<textarea id="content" name="content" cols="100" rows="8" style="width:700px;height:200px;visibility:hidden;"><%=rs("Content")%></textarea>

</div>
</div></td>
</tr>
<tr bgcolor="#FFF9E3">
<td height="25" colspan="4" align="center" bgcolor="#FFFFFF" class="back_southidc"><input type=submit value=确定 name=submit >
<input type=reset value=取消 name=reset></td>
</tr>
</table>
</form>

<!-- #include file="Inc/Foot.asp" -->

 

 

发表新帖 发表回复