ASP:Crazy蛙!模版操作类(最简单的模板类、仅提供交流)
文件名:Awa_temp.Class.asp
<%
'Crazy蛙!模板操作类
'作者Crazy~蛙! QQ:379969387 欢迎交流
'版本V1.0;
Class AwaTemp
Public aa
Private FSO,StrTemp,FileData,GetDatas,StrHtmlName,htmlwrite,StrLabel,StrLValues
'===========================================
'构造函数_初始化FSO组件
'===========================================
Private Sub Class_Initialize()
Set FSO=Server.CreateObject("Scripting.FileSystemObject")
End Sub
'===========================================
'构析函数_销毁FSO组件
'===========================================
Private Sub Class_terminate()
Set FSO=nothing
End Sub
'===========================================
'类属性
'===========================================
'版本信息
Public Property Get Version
Version="Crazy~蛙! 模板操作类!V1.0版本;"
End Property
'获取模板地址以及名称
Public Property Let Temp(ByVal Values)
StrTemp=Values
End Property
'获取生成文件的文件名
Public Property Let HtmlName(ByVal Values)
StrHtmlName=Values
End Property
'获取标签
Public Property Let Label(ByVal Values)
StrLabel=Values
End Property
'获取将标签替换的值
Public Property Let LValues(ByVal Values)
StrLValues=Values
End Property
'===========================================
'类方法
'===========================================
'检查模板设置以及是否存在
Private Function Check()
If StrTemp="" Then
Check="<span style='color:red;'>错误:未设置模板文件存储位置!</span>"
Else
If FSO.FileExists(StrTemp)=false Then
Check="<span style='color:red;'>错误:指定模板不存在!</span>"
Else
Check=true
End If
End If
End Function
'读取模板页
Public Sub ReadTemp()
If Check()<>true Then
Response.Write Check()
&nb
相关文档:
dim arr(36),xx,tt,tmp
for xx=1 to 36
arr(xx-1)=xx
next
for xx=1 to 5
Randomize
tt=clng((ubound(arr)-xx)*rnd())
response.write(arr(tt) & "<br>")
tmp=arr(tt)
arr(tt)=arr(ubound(arr)-xx)
arr(ubou ......
打开FCKEditor/Editor/Filemanager/Connectors/Asp/Commands.asp文件,修改FileUpload函数,如下所示:
Sub FileUpload( resourceType, currentFolder, sCommand )
Dim oUploader
Set oUploader = New NetRube_Upload
oUploader.MaxSize = 0
oUploader.Allowed = ConfigAllowedExtensions.Item( ......
按“F12”试试效果。
注:常用的时间函数:
now() 获取当前系统日期和时间,ASP输出可以这样写:<%=now()%>
Year(now()) 获取年份 ......
COM接口VC实现,接口:
[id(1), helpstring("method Test")] HRESULT Test([in] BSTR strInputA, [in] BSTR strInputB, [out,retval] VARIANT* result);
ASP调用:
Set objCompInfo =server.CreateObject("组件在系统中的名字")
  ......