Z-blog的文件管理功能很强,能在线编辑站点下的所有文本文件,但不能新建文件,总想给它增加个新建文件的功能,费了半天功夫总算搞出来了,修改了源文件:/function/c_system_manage.asp和/cmd.asp
在/function/c_system_manage.asp文件中
1、找到函数Function ExportSiteFileList(path,opath)
2、在response.write "<br>"&ZC_MSG240&":"&path 后加上如下代码
dim newfilepath
newfilepath=replace(path&"/",blogpath,"")
newfilepath=replace(newfilepath,"\","/")
newfilepath=newfilepath &"newfilename"
response.write" <a href=""../cmd.asp?act=SiteFileEdt&path=." & Escape(newfilepath) & """>[在当前路径下新建文件]</a>"
3、找到函数Function ExportSiteFileEdit(tpath)
4、将Response.Write "<p>
" & ZC_MSG170 & ":
<INPUT TYPE=""text"" Value="""&unEscape(tpath)&""" style=""width:100%"" name=""path"" id=""path"" readonly></p>"这句中的readonly去掉
在/cmd.asp文件中
1、找到函数Function SiteFilePst()
2、将If PostSiteFile(Request.QueryString("path")) Then 改为 If PostSiteFile(Request.form("path")) Then
评论