163K网站系统官方论坛's Archiver

nepharm 发表于 2007-9-26 15:57

ASP技巧:使用FSO自动创建多级文件夹的函数

开启FSO权限 在 开始-“运行”中执行regsvr32.exe scrrun.dll即可。如想关闭FSO权限,在上述命令中加/u参数。注册表中的键值位置:HKEY_CLASS_BOOT\F.S.O .FSO中有个方法是CreateFolder,但是这个方法只能在其上一级文件夹存在的情况下创建新的文件夹,所以我就写了一个自动创建多级文件夹的函数,在生成静态页面等方面使用非常方便.函数:
’ --------------------------------
’ 自动创建指定的多级文件夹
’ strPath为绝对路径
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) & "\"
                If Not objFSO.FolderExists(strTmpPath) Then
                        ’ 创建
                        objFSO.CreateFolder(strTmpPath)
                End If
        Next
        Set objFSO = Nothing
        If Err = 0 Then
                AutoCreateFolder = True

        Else
                AutoCreateFolder = False
        End If
End Function  
调用方法:
MyPath = "C:\a\b\c\"
If AutoCreateFolder(MyPath) Then
        Response.Write "创建文件夹成功"
Else
        Response.Write "创建文件夹失败"
End If
关键词:ASP,FSO

unuecn 发表于 2007-10-30 16:00

国际域名涨价,本公司不涨价 一律 48元一年一个

国际域名涨价,本公司不涨价 一律 48元一年一个
国际域名(.com .net)48元/年 注册多年价格48*N 来者即可购买
经过国际域名涨价风波,全世界的域名都涨价了,代理商的价格都有所提高.  
经过本公司综合考虑决定,为了不让客户为购买国际域名因价格有所阻挠,本公司的国际域名价格和涨价前的价格一样,不涨!!!  
一律48元/年 注册多年价格不变 48*N  做多可以连续注册10年  
详情登录 [url=http://www.unue.cn]http://www.unue.cn[/url]
免费转出,转入.过户:费用是 50元/个 (注意国内域名只可以过户给公司,不可以过户给到个人)
【100M动态空间】
                  
           > Windows或者Linux平台任意选择
           > 100MB独立网站空间 50MB邮局
           > 支持ASP/PHP/JSP
           > Access/5M Mysql数据库
           > FSO组件,Jmail组件,动易组件
             AspUpload组件,AspJpeg组件
           > phpMyAdmin管理面板
             PHP脚本语言 Zend加密程序 JSP脚本语言
           > 主机控制面板 购买实时开通
             数据定期备份 千兆防火墙 不间断电源
   价格:¥88.00元/1年(单线)  详情:[url=http://www.unue.cn/htdocs/store/viewproduct.php?product_id=8]http://www.unue.cn/htdocs/store/viewproduct.php?product_id=8[/url]
   价格:¥120.00元/1年(双线) 详情:[url=http://www.unue.cn/htdocs/store/viewproduct.php?product_id=54]http://www.unue.cn/htdocs/store/viewproduct.php?product_id=54[/url]
价格面对所有客户,只要您注册会员就可以直接注册你需要的域名,价格都是一样!!
网上生意诚信是最重要的,所以我们的服务宗旨就是,以最低价格出售,以最好的服务来报答客户,打造诚信服务一条龙!!

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.