| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 555 人关注过本帖
标题:FSO 文件如何改成ADODB.Stream
只看楼主 加入收藏
ali218
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-5-13
收藏
 问题点数:0 回复次数:0 
FSO 文件如何改成ADODB.Stream

下面的FSO 文件,如何改成ADODB.Stream呢,因为我要生成UTF-8格式文件
请高手帮忙
(是新云的include/collection.asp)


'================================================
'函数名:CreatedPathEx
'作 用:FSO创建多级目录
'参 数:LocalPath ----原文件路径
'返回值:False ---- True
'================================================
Public Function CreatedPathEx(ByVal sPath)
sPath = Replace(sPath, "/", "\")
sPath = Replace(sPath, "\\", "\")
On Error Resume Next

Dim strHostPath,strPath
Dim sPathItem,sTempPath
Dim i,fso

Set fso = Server.CreateObject("Scripting.FileSystemObject")
strHostPath = Server.MapPath("/")
If InStr(sPath, ":") = 0 Then sPath = Server.MapPath(sPath)
If fso.FolderExists(sPath) Or Len(sPath) < 3 Then
CreatedPathEx = True
Exit Function
End If

strPath = Replace(sPath, strHostPath, vbNullString,1,-1,1)
sPathItem = Split(strPath, "\")

If InStr(LCase(sPath), LCase(strHostPath)) = 0 Then
sTempPath = sPathItem(0)
Else
sTempPath = strHostPath
End If

For i = 1 To UBound(sPathItem)
If sPathItem(i) <> "" Then
sTempPath = sTempPath & "\" & sPathItem(i)
If fso.FolderExists(sTempPath) = False Then
fso.CreateFolder sTempPath
End If
End If
Next
Set fso = Nothing
If Err.Number <> 0 Then Err.Clear
CreatedPathEx = True
End Function

'--删除文件
Public Function DeleteFiles(ByVal sFilePath)
On Error Resume Next
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
fso.DeleteFile sFilePath, True
DeleteFiles = True
Set fso = Nothing
Exit Function
End Function

[此贴子已经被作者于2007-10-7 15:18:40编辑过]

搜索更多相关主题的帖子: FSO Stream sPath ADODB 
2007-10-07 15:17
快速回复:FSO 文件如何改成ADODB.Stream
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024656 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved