An example of a template from a class to an instance
This class still has a lot of imperfections (such as efficiency), I hope we discuss together, master a lot of correct.
-----------------------------------------------------------------------
First,
Id=trim (Request.QueryString ("userid")) ' Gets the current user name, which is himself (equal to session ("UserID")
If Request.QueryString ("act") = "send" Then ' get current operation status
Who=trim (Request.Form ("who")) ' If the status is sent,
How to implement Ping in ASP
Use WSH to call the system's ping command, redirect the Ping's results to a text file, and then display the text file to the Web page
The following are specific practices:
First, build one. BAT file (for example:
http://community.111cn.net/Expert/topic/3722/3722373.xml?temp=.6881372
Rs.Open "SELECT Top 3 * FROM table ORDER BY id DESC", conn,1,1
Ii=1
Do as not rs.eof%>
' id= ' img ' > ' >
Rs.movenext
Loop
Rs.close
Set rs=nothing
%>
' name=rights onclick= "
' To get the keyword pageRemoteurl = "http://111cn.net "
' Create a XMLHTTP connectionSet Objxml = CreateObject ("Microsoft.XMLHTTP")Objxml.open "Get", Remoteurl, FalseObjxml.send
' Get the return dataResponsepage = Objxml.responsetext
Set Objxml
Class Systeminfo_cls
Public Browser, version, Platform, Issearch, Alexatoolbar
Private Sub Class_Initialize ()
Dim Agent, Tmpstr
Issearch = False
If Not IsEmpty (session ("Systeminfo_cls")) Then
TMPSTR = Split (Session ("Systeminfo_cls"), "| |
Backing up the database is what every webmaster has to do, and here's a simple article that uses ASP to back up an Access database.
Public Function compactdbfile (strdbfilename)Dim jet_conn_partialDim SourceconnDim DestconnDim OjetengineDim oFSOJet_
'***********************************************' Procedure name: ShowPage' Function: Show "previous page next page" and other information' parameter: sfilename----link Address' Total number of totalnumber----' Maxperpage----number per page'
ASP Implementation Remote save Picture Source code example:ASP Implementation Remote save Picture
Function showpic (str)Set objregexp = New Regexp ' Set Configuration objectObjregexp.ignorecase = True ' ignores caseObjregexp.global = True ' Set to
'***********************************************' Procedure name: ShowPage' Function: Show "previous page next page" and other information' parameter: sfilename----link Address' Total number of totalnumber----' Maxperpage----number per page'
Q: installation of IIS, how ASP files can not open
I'm not connected to the Internet for the time being. I have IIS installed, but the ASP files on the local machine are not open. Prompts to select the program, but lack of ie. Open IE, file "Open
' =================================================== ======================= Dim Idcount ' Total Number of records Dim pages ' per page number Dim Pagec ' Total Pages Dim page ' Page Number Dim Pagenc ' Paging per page Number of page numbers
Dim sql_injdataSql_injdata = "Exec|insert|select|delete|update|count|*|mid|master|truncate|char|declare"Sql_inj = Split (Sql_injdata, "|")
If request.querystring<> "" ThenFor each sql_get in Request.QueryStringFor Sql_data=0 to Ubound (Sql_inj)If
Take advantage of Request.ServerVariables ("query_string") to obtain the received value (? After the parameter).
For example [Url=http://www.111cn.net/?3-8.html]http://www.111cn.net/?3-8.html[/url] Receive is 3-8.html, 3-8.html filter, only need to
The code is as follows
Copy Code
Dim Url,html,timeTime=request ("Time")Url= "Http://weather.cncn.com/get_weather.php?action=get_city&time= '" &time& "'"//Read the weather information on the CNCNHtml = Gethttppage (URL)Html=replace
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.