求大神帮忙,asp写不进内容?
在程序后台管理,编辑好css文本内容后,点击 -确认修改-,没有提示 "修改成功!"。然后返回编辑页面,刷新一下,内容还是原来的,没有编辑成功?求大神帮忙。感谢程序代码:
<!--#include file="Conn.asp"--> <% ctitle "CSS设计","" Act=request.QueryString("Act") Select Case LCase(Act) Case "tm" Call tmlist() Case "tx" Call txlist() Case Else Call Stlist() End Select sub stlist() dim objf,fso,f set fso=server.createobject("scripting.filesystemobject") on error resume next set f=fso.GetFolder(server.mappath("/cs/skin/"&ffile)) For Each objf in f.Files response.write"<a href=""Ywicp_Csssj.asp?Act=tm&ffile="&objf.name&"&"&Ywicpcom&""">"&objf.name&"</a><br/>" next set fso=nothing set f=nothing end sub sub tmlist() ffile=Request.QueryString("ffile") Set objStream = CreateObject("adodb.stream") objStream.Open objStream.Type = 2 objStream.Charset = "utf-8" on error resume next objStream.LoadFromFile(Server.MapPath("/cs/skin/"&ffile)) If Err Then response.Write "对不起,文件不存在!<br/>" Else TempFile = objStream.ReadText objStream.Close Set objStream = Nothing%> 文件路径 <font color="blue">skin/<%=ffile%> {↓CSS内容↓}</font><br/> <form action="Ywicp_Csssj.asp?Act=tx&<%=Ywicpcom%>" method="post"> <input type="hidden" name="ffile" value="<%=ffile%>" /> <textarea rows="15" cols="40" name="content"><%=tempfile%></textarea><br/> <input type="submit" value="确认修改"/> </form><%End IF%><%End sub%> <%sub txlist() dim filename,wmlhead wmlhead = "banse.css" content=trim(request("content")) ffile=trim(request("ffile")) filename="/cs/skin/"&ffile call SaveToFile(content,filename) Set fso = server.CreateObject("Scripting.FileSystemObject") filesize=fso.GetFile(Server.MapPath(filename)).size response.write"修改成功!<br/>" end sub%> <%if request("Act")<>"" then response.Write("<hr/><a href=""Index.Asp?"&Ywicpcom&""">返回后台管理</a><br/>") ffile=Request.QueryString("ffile") end if%> <!--#include file="Bottom.Asp"-->
[此贴子已经被作者于2021-2-8 19:01编辑过]