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

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

SEO SEO


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



远程存图按日期目录存放

2018-08-20 23:25:00 向站长提问 编辑: 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

 

全能
网址:
文字:
领红包:
360:
神马:
文字:





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








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

远程存图按日期目录存放




站内推荐
A
B
C
D
E
F


网站分类


标签列表


关于我们
本站主机域名成本巨大,无以为继,希望想在本站做宣传的老板可以联系我们!以维持我们网站的正常运行!感谢
联系我们: 给我发QQ消息  加入QQ群