' Option ExplicitClass Validator''*************************************************' Validator for ASP Beta 3 server-side script"Code by my Foshan people"' Wfsr@cunite.com''*************************************************Private RePrivate
IP filtering restriction function in ASP
' Get the visitor's address
Ip=request.servervariables ("REMOTE_ADDR")
' The allowed IP address segment is 10.0.0.0~10.68.63.255
allowip1= "10.0.0.0"
Allowip2= "10.68.10.71"
Response.Write Checkip (IP,ALLOWIP1
Introduction: connecting to various types of databases and database operation functions
BelowProgramIt can be said that the omnipotent database connection program can connect almost all the MS databases, and you can study it yourself (this
CopyCode The Code is as follows: Class xmlclass
Private objxml
Private xmldoc
Private xmlpath
'// ============================================== ======================================
'
Sub class_initialize
Set objxml = server. Createobject ("msxml2.
Navigate to: Editor\filemanager\connectors\asp\io.asp
Mainly modify: Sanitizefilename This function, and add a method to get extension and file renaming, the detailed code is as follows:
Copy Code code as follows:
' Do a cleanup of the '
Some of them were previously written when I learned to crack and write the registration machine. Some of them were written by some of my brother's code. It is not easy to write:
{===================================================== =================
asp.net| function ' Uses the Timespan method to subtract a certain number of days
Function Date1 ()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract (New TimeSpan (7, 0, 0, 0))
NewTime = Newtime.format ("mm/dd/yyyy",
Document directory
Create class xprop
Create class xpropdescriptor
Create class xprops
Interface code
Test
Target
The basic usage of PropertyGrid is to bind a fixed class to display the attributes and values of this class.
However, in some
Basic Functions
Date () Get dates, format: 2004-2-28
Time () to get the date, format: 22:24:59
Now () Get date and time format: 2005-5-2 22:37:30
How to use:
D=date ()
Get Year: Years (d)
Get month: month (d)
Get Days: Day (d)
Get Day of the
' Uses the Timespan method to subtract a certain number of days
Function Date1 ()
Dim NewTime as DateTime
NewTime = DateTime.Now.Subtract (New TimeSpan (7, 0, 0, 0))
NewTime = Newtime.format ("mm/dd/yyyy", DateTimeFormatInfo)
Response.Write (NewTime)
Using the IDWriteTextLayout. Draw () method to Draw text is mainly to implement the IDWriteTextRenderer interface.
The IDWriteTextRenderer interface can only be implemented manually and is flexible.
Unit Unit1; interfaceuses Windows, Messages,
'Timeout '----------------------------------------------------------------------------------------------------'Function name: Length'Function Desc: returns the actual length of a string. One Chinese character is counted as two lengths.'Timeout '-----
Save the following code in an ASP file to facilitate the management of files on the server
http://bbs.asp2004.net production: Small Gray qq:103895
Action=request. QueryString ("Action")
Temp=split (Request. ServerVariables ("URL"), "/"
Url=temp
vbscript| function '----------------------------------------------------------
' Function name:length
' Function Desc: Returns the actual length of the string, one Chinese character counts 2 lengths
'--------------------------------------------------
' Get picture width and height of class, support Jpg,gif,png,bmp 'Class Imgwhinfo Dim ASOPrivate Sub Class_InitializeSet aso=server.createobject ("ADODB. Stream ")ASO. Mode=3ASO. Type=1ASO. OpenEnd SubPrivate Sub Class_TerminateErr.ClearSet
Program | data | database | Database connection I've never used a DNS connection. I think that is very inconvenient, the following part of the program can be said to be a universal database connection program can almost connect all the MS database,
1 shdocvw_tlb is shdocvw. if no DLL Type Library is imported, change it to shdocvw (built-in Delphi), or select "Import Type Library" under the "project" menu ", in the displayed dialog box, select "Microsoft Internet controls" and click "create
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.