站长百科 | 数字化技能提升教程 数字化时代生存宝典
首页
数字化百科
电子书
▼
建站程序
开发
服务器
办公软件
开发教程
▼
服务器教程
软件使用教程
运营教程
热门电子书
▼
CSS教程
WordPress教程
导航
程序频道
推广频道
网赚频道
人物频道
网站程序
网页制作
云计算
服务器
CMS
论坛
网店
虚拟主机
cPanel
网址导航
WIKI使用导航
WIKI首页
热点词条
最新资讯
网站程序
站长人物
页面分类
使用帮助
编辑测试
创建条目
网站地图
站长百科导航
站长百科
主机侦探
IDCtalk云说
跨境电商导航
WordPress啦
站长专题
网站推广
网站程序
网站赚钱
虚拟主机
cPanel
网址导航专题
云计算
微博营销
虚拟主机管理系统
开放平台
WIKI程序与应用
美国十大主机
编辑“
FoosunCMS-删除下载
”
人物百科
|
营销百科
|
网赚百科
|
站长工具
|
网站程序
|
域名主机
|
互联网公司
|
分类索引
跳转至:
导航
、
搜索
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
<span style="border:1px solid #000; float:right; text-align:center; padding:6px;"><strong>导航:</strong>[[FoosunCMS教程|返回上一页]]</span> <div style="clear:both;"></div> == 补丁运用 == #[[备份]]相应文件 #替换目录inc\Function.asp中的文件 #替换目录Admin\Info中的文件DelContent.asp 这些文件中可能包含其它补丁,如查直接替换有问题请参照下列修改方法去修改。 == 修改方法分三大步 == 一、在文件Inc\Const.asp中增加一句 Const Delpic="yes" '新闻与[[下载]]删除的同时,是否删除远程保存的图片(仅删BeyondPicDir中的)。yes:删除,其它不删除。 二、在文件Admin\Info\DelContent.asp中 <pre> (1)在 If MyFile.FileExists(Server.Mappath (DelNewsSysRootDir&DelNewsClassFileObj ("SaveFilePath")&"/"&DelNewsClassFileObj ("ClassEName"))&"/"&DelNewsFileObj("FileName") &"."&DelNewsFileObj("FileExtName")) then MyFile.DeleteFile(Server.Mappath (DelNewsSysRootDir&DelNewsClassFileObj ("SaveFilePath")&"/"&DelNewsClassFileObj ("ClassEName"))&"/"&DelNewsFileObj("FileName")& "."&DelNewsFileObj("FileExtName")) End if 后插入 '------------删除远程存图的图片--doudou888-------- If LCase(Delpic)="yes" Then Call DelLocalFile(replace(DelNewsFileObj ("Content"),DelNewsSysRootDir," http://127.0.0.1"&DelNewsSysRootDir)) Dim timPic,timPicPath timPic=DelNewsFileObj("PicPath") If InStr(LCase(timPic),LCase(UpFilesZn))>0 Then '站内 timPicPath=DelNewsSysRootDir&Mid(timPic,1,InstrRev(timPic,"/")-1) Else '站外 timPicPath=Mid(timPic,1,InstrRev(timPic,"/")-1) End If 'Call DelFilesFolder(timPicPath,"",Mid(timPic,InstrRev(timPic,"/")+1)) Call DelFilesFolder(timPicPath,"",DelNewsFileObj("NewsID")&"_") End if '------------------------------------------------- (2)在 if MyFile.FileExists(Server.MapPath(DelNewsSysRootDir & DelDownClassObj("SaveFilePath") & "/"& DelDownClassObj("ClassEName")) & "/" & DelDownloadObj("FileName") & "." & DelDownloadObj("FileExtName")) then MyFile.DeleteFile (Server.MapPath(DelNewsSysRootDir & DelDownClassObj("SaveFilePath") & "/"& DelDownClassObj("ClassEName")) & "/" & DelDownloadObj("FileName") & "." & DelDownloadObj("FileExtName")) end if 后插入 '-----------------删除远程存图的图片--------------- If LCase(Delpic)="yes" Then Call DelLocalFile(replace(DelDownloadObj ("Description"),DelNewsSysRootDir," http://127.0.0.1"&DelNewsSysRootDir)) Dim timPic,timPicPath timPic=DelDownloadObj("Pic") If InStr(LCase(timPic),LCase(UpFilesZn))>0 Then '站内 timPicPath=DelNewsSysRootDir&Mid(timPic,1,InstrRev(timPic,"/")-1) Else '站外 timPicPath=Mid(timPic,1,InstrRev(timPic,"/")-1) End If 'Call DelFilesFolder(timPicPath,"",Mid(timPic,InstrRev(timPic,"/")+1)) Call DelFilesFolder(timPicPath,"",DelDownloadObj("DownLoadID")&"_") End if '------------------------------------------------- (3)在 Set MyFile=nothing Set Conn = Nothing 前插入 '************************************************** '过程名:DelLocalFile(NewsContent) '作 用:取出NewsContent中所含的文件路径temDelLocalFilePath与 名称DelLocalFileName,提供给DelFilesFolder '参 数:NewsContent '设 计:doudou888 QQ:280106330 主页:http://nhez.chinese.cn.com '************************************************** Function DelLocalFile(NewsContent) Dim re1 Set re1 = New RegExp re1.IgnoreCase = True re1.Global=True re1.Pattern = "((http|https|ftp|rtsp|mms): (\/\/|\\\\){1}((\w)+[.]){1,}(net|com|cn|org|cc|tv| [0-9]{1,3})(\S*\/)((\S)+[.]{1}(gif|jpg|png|bmp)))" Set DelLocalFile = re1.Execute(NewsContent) Set re1 = Nothing For Each DelLocalFileurl in DelLocalFile dim temDelLocalFilePath,DelLocalFileName DelLocalFileName = Mid(DelLocalFileurl,InstrRev(DelLocalFileurl,"/")+1) dim temDelLocalFileurl temDelLocalFileurl=replace(DelLocalFileurl,"://","") temDelLocalFilePath=Mid(temDelLocalFileurl, Instr(temDelLocalFileurl,"/"), InstrRev(temDelLocalFileurl,"/")-Instr(temDelLocalFileurl,"/")) Call DelFilesFolder(temDelLocalFilePath,"",DelLocalFileName) Next End Function '************************************************** '过程名:DelFilesFolder(Path,ClassEName,FileName) '作 用:删除文件。删除Path、ClassEName下的有文件名FileName的文件 '参 数:Path,ClassEName,FileName '设 计:doudou888 QQ:280106330 主页:http://nhez.chinese.cn.com '************************************************** Sub DelFilesFolder(Path,ClassEName,FileName) '删除文件、目录 '远程图片保存目录内的图片 'If InStr(LCase(Path),LCase(BeyondPicDir))>0 and ((InStr(LCase(Path),LCase("http://"))>0 and (InStr(LCase(Path),LCase(GetLoginUrl()))>0 or InStr(LCase(Path),LCase(RsNewsConfigObj("DoMain")))>0)) or InStr(LCase(Path),LCase("http://"))=0) Then If InStr(LCase(Path),LCase(BeyondPicDir))>0 and ((InStr(LCase(Path),LCase("http://"))>0 and (InStr(LCase(Path),LCase(GetLoginUrl()))>0 )) or InStr(LCase(Path),LCase("http://"))=0) Then Dim FSOObj,TempPath,FolderObj,FileObj,ItemObj Set FSOObj = Server.CreateObject("Scripting.FileSystemObject") 'Path="/fx/Files/BeyondPic/2005/8-21" 'FileName="15-Water.jpg" TempPath = Server.MapPath(Path) if ClassEName <> "" then TempPath = TempPath & "\" & ClassEName End If Set FolderObj = FSOObj.GetFolder(TempPath) Set FileObj = FolderObj.Files for Each ItemObj in FileObj if InStr(LCase(ItemObj.name),LCase(FileName))>0 then 'if LCase(ItemObj.name)=LCase(FileName) then FSOObj.DeleteFile TempPath & "/" & ItemObj.name end if Next Set FSOObj = Nothing End If End Sub </pre> 三、在Inc\Function.asp中 添加函数GetLoginUrl() (有添加的此步可以绕过) <pre> '************************************************** '过程名:GetLoginUrl() '作 用:取得当前服务器IP 如:http://127.0.0.1 '参 数:无 '设 计:doudou888 QQ:280106330 主页:http://nhez.chinese.cn.com '************************************************** Function GetLoginUrl() dim temLoginUrl if Request.ServerVariables("SERVER_PORT")<>"80" then temLoginUrl = "http://" &Request.ServerVariables("LOCAL_ADDR")& ":" & Request.ServerVariables("SERVER_PORT") else temLoginUrl = "http://"&Request.ServerVariables("LOCAL_ADDR") end if GetLoginUrl=temLoginUrl End Function </pre> == 参考来源 == *[http://www.foosun.net/ 参考来源] [[category:FoosunCMS|F]]
摘要:
请注意,您对站长百科的所有贡献都可能被其他贡献者编辑,修改或删除。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源(参阅
Wordpress-mediawiki:版权
的细节)。
未经许可,请勿提交受版权保护的作品!
取消
编辑帮助
(在新窗口中打开)