Some sites for a variety of reasons, in IIS modified the default suffix of dynamic pages, the ASP era, someone on the server to modify the configuration, the HTML suffix file as an ASP file to resolve: that is, ASP programs (. asp) can be saved as a.
The code is as follows:
Copy Code code as follows:
' Use ASP to obtain the remote target Web page specified content, the code is provided by Guangzhou website Construction http://www.jb51.net
On Error Resume Next
server.scripttimeout=9
' Name: ASP Universal Collection function redundant version, to the high-quality version of the conscientious change
' Author: Liu Yong FA
' Date: 2007-6-23
Function Gethttppage (Path)
t = GetBody (Path)
Gethttppage = Bytestobstr (t, "GB2312")
End
' Read the contents of the file.
Copy Code code as follows:
Function loadfile (ByVal File)
Dim objstream
On Error Resume Next
Set objstream = Server.CreateObject ("ADODB. Stream ")
If err.number=-2147221005 Then
Response.Write "
First write in ASP file such as code
If you want to hide, add some if judgment statements, you can
and write a form locally.
Copy Code code as follows:
Set Lp=server.createobject ("ADODB.stream")
Lp.open
lp.type=2
lp.charset= "gb231
Just put it in the conn.asp.
' Shield attacks through address bar
Url=request.servervariables ("Query_string")
If InStr (URL, ";") >=1 Then
Url=replace (URL, ";", ";"): Response.Redirect ("?" & URL)
End If
' Masks are attacked by forms
For each
Description
1, this tool can bulk replace the site asp,.txt,php,aspx ... And so on, text-type characters
2, will replace.asp upload to the site root directory, run http://site domain name/replace.asp
3. For safety, please delete or rename it after
Example:
For example: Enter the field name: Username,password,email,telphone
Note: Different field names are separated by commas in English and do not support asterisks
Table name Enter the table name to query: such as: table1
Front desk Form page:
1. Creating a Recordset object
Copy Code code as follows:
Dim Objmyrst
Set objmyrst=server.createobject ("ADODB. Recordset ")
Objmyrst.cursorlocation=aduseclientbatch ' client can be processed in batches
In some cases, you may want to cache the ASP.net page, but you need to update the selected section on the page based on each request. For example, you might want to cache a large portion of a page, but you need to dynamically update the time-related
Rnd function
DescribeReturns a random number.Grammarrnd[(number)]The number argument can be any valid numeric expression.
DescriptionThe RND function returns a value less than 1 but greater than or equal to 0. The value of number determines how
This article uses the ASP and the JMail to realize sends the mail, everybody is not very curious this is how realizes of Na, and small arranges together a to find out!
Global.asa fileWhat is a Global.asa file? It is actually an optional file where
ASP uses functions to implement substitution, save the remote picture, complete the automatic collection of pictures, extract the image function, the function automatically judge the duplicate picture, intelligent analysis link path, and turned into
This article will continue to introduce some of the Web dynamic features written in ASP. Because of the inconsistent web browser standards so that how to make their own web site to adapt to a variety of different browsers to become the most
A decoding problem is encountered when developing with ASP. Although using Request in ASP to get encoded URL strings will automatically decode, but Request.BinaryRead (request.totalbytes) when the post data is not decoded, so can only manually
This is just an ASP tip class thing, although it is suitable for each of the different file names call this function, but there are prerequisites, let's take a closer look at the story.The following section is the basic page-splitting code:
ASP's circular statements have the following categories:
The function of a circular statement is to repeat the execution of the program code, which can be divided into three categories: a class repeats the statement before the condition becomes
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service