In the browser's address bar directly enter a doc or xls or JPG file URL path, then the file will be directly displayed in the browser. And in a lot of times we want to be able to pop the download prompt box to let users download, what should we do?
Now online more popular thief program, there are news thieves, music thieves, download thieves, then they are how to do it, I would like to do a simple introduction, I hope to help you webmaster.
(i) principle
The thief program actually invokes
Now the popular virtual host station, I also have a website, is also a webmaster slightly. When the webmaster for nearly a year, feel the site program every time the upgrade is quite troublesome: first go to the official notice, and then download
Copy Code code as follows:
1. To determine whether there is injection
; and 1=1
; and 1=2
2. Preliminary Determination of MSSQL
; and user>0
3. Injection parameters are characters
' and [query conditions] and ' = '
4. No filter
Rem # Long Integer Conversion
Function Tonum (s, default)
If IsNumeric (s) and S <> "" Then
Tonum = CLng (s)
Else
Tonum = Default
End If
End Function
REM # SQL Statement conversions
Function Tosql (str)
If IsNull (str) Then str = ""
Tosql = replace
Delete a single record
Copy Code code as follows:
id = saferequest ("id")
Sql= "Delete from table1 where whereid>" &id& "
Rs.Open sql,conn,1,3
Response.Write ""
Set rs=nothing
Set conn=nothing
This is the filter
Brief introduction: General A Web site's first visit is the largest, if your site's home page open very slowly, your customers will be leaving your site. Often we cache data that requires complex operations or query databases, or generate static Web
One, with the session of the different points
Membership generally refers to the use of Microsoft's ASPNETDB database for identity authentication
Session refers to the conversation information of a site user
The functions provided by the
' Database management class
Class Datas
' Backup
Public Sub Bk ()
Set fso=server.createobject ("Scripting.FileSystemObject")
Fso. CopyFile Server.MapPath (Sitedatapath), Server.MapPath (Sitedatabakpath)
Set fso=nothing
Response. Write (" ")
End Sub
Many people may have their own ASP personal homepage, but there is not a lot of database permissions, today I give a method. You can build a library of your own. Not in Access or SQL Server format. is to build a format of your own. (It sounds high
Following the previous article "ASP Knowledge Collation Notes 1" and "ASP Knowledge Collation Notes 2", "ASP Knowledge Collation Notes 3" Fresh baked: 23. Question: Are there several ways to read HTML form fields in an ASP file? A: The Request
In the new version of MVC6, Microsoft offers a powerful Taghelper feature that lets us get rid of the following bloated code:
@Html. Labelfor (model => model. FullName)
@Html. Editfor (model => model. FullName)
@Html. Validationmessagefor
We know that in the MVC5 and previous versions, the lifecycle of the two frameworks is not the same, in the new MVC6, MVC controller/web API Controller has been combined, this chapter we mainly explain the definition and use of Controller and action,
no.1--build an XML database Data.xml
caca
154222225
root@3ney.com
no.2--Set up Objects CreateObjectSet up the Data.xml object first
Set Xmldoc=server.createobjcet ("Microsoft.XMLDOM")
xmldoc.load (Server.MapPath ("Data.xml")
Usage of request:
The request has three methods for obtaining form values, which are used for the acquisition of different form submission methods respectively. A form can simply be thought of as a collection of parameters to be passed by a page,
1. Stop IIS;
2. Enter the reverse registration command regsvr32/u Vbscript.dll in operation, prompt to enter 3rd step after successful
3. Enter the anti-registration command regsvr32/u in Run%windir%\system32\inetsrv\asp.dll
4. Start IIS;
5.
The COONAMD object defines the commands that will be executed on the data source, can be used to query the database table and return a recordset, and can be used to add, change, and delete database tables.First, use the command object steps:when
Steps 1, never trust that the user input has the appropriate size or contains the appropriate characters. You should always validate user input before you use it to make a decision. The best option is to create a COM + component so that you can
In the development of applications, some of the input information is dynamic, such as we want to register an employee's work experience, such as the following figure
If made dead, can only fill in three, if it is four? Or more, it is not added,
A Implementation principle analysis of file uploading based on ASPThe basic principle is: Use ADO Stream object's BinaryRead method to read out all the data in form, intercept the required file data and save it in binary file.Here is an example of
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.