远程存图按日期目录存放 - 风讯CMS - 爱建站

,,,,CMS教程,模板无忧,建站教程,CMS教程,风讯Cms教程,

SEO SEO

首页  >   风讯CMS > 远程存图按日期目录存放  >  正文

远程存图按日期目录存放

2018-09-27 07:33:04 向站长提问 编辑: admin 阅读:

 

本文讨论区:http: bbs foosun net dispbbs asp?boardID=22&ID=7958&page=1 方法:1、修改图片新闻文件:admin Info NewsPic asp A、查找: If ISavePic = "1 " then INewsAddObj( "Content ") = ReplaceRemoteUrl(Save_Content, " " & UpFiles & " " & BeyondPicDir,RsNewsConfigObj( "DoMain "),DummyPath_Riker)Else INewsAddObj( "Content ") = Save_Content 新闻内容 尚未判定End IfB、以及文字新闻文件:admin Info NewsWords aspIf ISavePic = "1 " then INewsAddObj( "Content ") = ReplaceRemoteUrl(Save_Content, " " & UpFiles & " "&BeyondPicDir,RsNewsConfigObj( "DoMain "),DummyPath_Riker)else INewsAddObj( "Content ") = Save_ContentEnd If 替换成:If ISavePic = "1 " then INewsAddObj( "Content ") = ReplaceRemoteUrl(Save_Content, " " & UpFiles & " "&BeyondPicDir & " " & year(now) & "- " & month(now) & "- " & day(now),RsNewsConfigObj( "DoMain "),DummyPath_Riker)else INewsAddObj( "Content ") = Save_ContentEnd If2、修改网站根目录下Inc Function asp (非admin inc function asp文件)A、查找Function ReplaceRemoteUrl(NewsContent,SaveFilePath,FunDoMain,DummyPath)在此函数里添加:(比如在 Set re = Nothing 下面加) AutoCreateFolder(Server MapPath(SaveFilePath)) B、添加函数: ================================================ 按月份自动明名上传文件夹,需要FSO组件支持


本文讨论区:http://bbs.foosun.net/dispbbs.asp?boardID=22&ID=7958&page=1

方法:
1、修改图片新闻文件:admin/Info/NewsPic.asp

A、查找: If ISavePic = "1" then
INewsAddObj("Content") = ReplaceRemoteUrl(Save_Content,"/" & UpFiles & "/" & BeyondPicDir,RsNewsConfigObj("DoMain"),DummyPath_Riker)
Else
INewsAddObj("Content") = Save_Content "新闻内容 尚未判定
End If
B、以及文字新闻文件:admin/Info/NewsWords.asp
If ISavePic = "1" then
INewsAddObj("Content") = ReplaceRemoteUrl(Save_Content,"/" & UpFiles & "/"&BeyondPicDir,RsNewsConfigObj("DoMain"),DummyPath_Riker)
else
INewsAddObj("Content") = Save_Content
End If

替换成:
If ISavePic = "1" then
INewsAddObj("Content") = ReplaceRemoteUrl(Save_Content,"/" & UpFiles & "/"&BeyondPicDir & "/" & year(now) & "-" & month(now) & "-" & day(now),RsNewsConfigObj("DoMain"),DummyPath_Riker)
else
INewsAddObj("Content") = Save_Content
End If
2、修改网站根目录下Inc/Function.asp (非admin/inc/function.asp文件)
A、查找Function ReplaceRemoteUrl(NewsContent,SaveFilePath,FunDoMain,DummyPath)
在此函数里添加:(比如在 Set re = Nothing 下面加)
AutoCreateFolder(Server.MapPath(SaveFilePath))

B、添加函数:
"================================================
"按月份自动明名上传文件夹,需要FSO组件支持。
" 自动创建指定的多级文件夹
" strPath为绝对路径
" 引用请保留版权
" by im286_Anjer
" 2005-4-3
" http://www.ggmo.net
"调用方法:AutoCreateFolder("C:\a\b\c")
"================================================
Function AutoCreateFolder(strPath) " As Boolean
On Error Resume Next

Dim astrPath, ulngPath, i, strTmpPath
Dim objFSO

If InStr(strPath, "\") <=0 Or InStr(strPath, ":") <= 0 Then
AutoCreateFolder = False
Exit Function
End If
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strPath) Then
AutoCreateFolder = True
Exit Function
End If
astrPath = Split(strPath, "\")
ulngPath = UBound(astrPath)
strTmpPath = ""
For i = 0 To ulngPath
strTmpPath = strTmpPath & astrPath(i) & "\"9 7 3 1 2 4 8 :

查看更多 风讯cms教程  风讯cms模板


远程存图按日期目录存放
http://www.yuedudg.cn/article/15105881.html

 

友情链接
discuz经验网 ecshop经验网 cms综合网
织梦之家 zblog之家 帝国cms常识
wp之家 phpcms之家


Tags: CMS教程 模板无忧 建站教程 CMS教程 风讯Cms教程


手机浏览本文
远程存图按日期目录存放

远程存图按日期目录存放

站内推荐

网站分类

标签列表

关于我们
文章内容来源互联网仅供参考,如果还有疑问请联系我们!我们将竭力帮您解决您的问题
联系我们:

QQ: 397423577 

email:397423577@qq.com

微信:ganenboy