2006年10月1日 20:07
在ASP编程中使用数组
数组的定义
Dim MyArray
MyArray = Array(1,5,123,12,98)
可扩展数组
Dim MyArray()
for i = 0 to 10
ReDim Preserve MyArray(i)
MyArray(i)=i
next
数组的定义
Dim MyArray
MyArray = Array(1,5,123,12,98)
可扩展数组
Dim MyArray()
for i = 0 to 10
ReDim Preserve MyArray(i)
MyArray(i)=i
next
2006年9月27日 20:05
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
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
2006年9月10日 20:02
Date 函数
描述:返回当前系统日期。
语法:Date
DateAdd 函数
描述:返回已添加指定时间间隔的日期。
语法:DateAdd(interval, number, date)
interval: 必选。字符串表达式,表示要添加的时间间隔。有关数值,请参阅“设置”部分。
number: 必选。数值表达式,表示要添加的时间间隔的个数。数值表达式可以是正数(得到未来的日期)或负数(得到过去的日期)。
描述:返回当前系统日期。
语法:Date
DateAdd 函数
描述:返回已添加指定时间间隔的日期。
语法:DateAdd(interval, number, date)
interval: 必选。字符串表达式,表示要添加的时间间隔。有关数值,请参阅“设置”部分。
number: 必选。数值表达式,表示要添加的时间间隔的个数。数值表达式可以是正数(得到未来的日期)或负数(得到过去的日期)。









