In doing website development, often need to get, the server's some basic information, how to get it, see the following brief introduction:
copy Code code as follows:
//server name "server name": Server.machinename "Server Domain":
In the previous article, the author gave you a detailed introduction of the two very useful ASP built-in object application and session of the use of the method. Since both the OnStart and the OnEnd event scripts must be declared in the Global.asa
Function 1, DateTime digital type
System.DateTime currenttime=new System.DateTime ();
1.1 to take the current month and the day seconds
Currenttime=system.datetime.now;
1.2 Take as the year before last
int year =currenttime.year;
1.3 Take the
js| Download
/*bluedestiny (Blue fate) * *Download hotlinking questions, the beholder, the benevolent; here is only a purely discussion technique.If it is the page anti-theft chain, the usual method is to use ServerVariables ("SERVER_NAME") combined
Tips In doing E-commerce sites often require browsers to convert between HTTPS and HTTP
Below I give the corresponding code:
To have an ASP page start with HTTPS, add the following code at the top of the ASP page:
Response.Buffer = True
If
How to better achieve the prevention of hacker attacks, I mention personal views! First, the free program does not really have a fee, since you can share the original code, then the attacker can analyze the code. If you pay attention to precautions
Ajax
For a long time did not write ASP, this time to write a message board really feel a little difficult, the competition has written a whole day, haha.There is nothing else to write, the use of three-layer structure (do not know, the original
HTML section
When a user is logged into the security area of your site, you can use the Login_user in the ServerVariables collection to understand the logged in user account, and of course remember to turn off the Allow anonymous login, and now
Object|request
Request Object
The request object retrieves the values that the client browser passes to the server during the HTTP request.
Grammar
Request[.collection|property|method] (variable)
CollectionClientCertificate stores the value of
The use of 301 redirect can be without the WWW domain name to the WWW domain name, so that the weight can be all pointed to the domain name with www, the site optimization is very helpful.
"" Then query_stringstr= "?" &query_stringstr IF InStr
Introduction | static | page
There are only two main steps to generate HTML methods:
First, get the contents of the HTML file to be generatedSave the contents of the obtained HTML file as an HTML file
My main point here is just the first step: How
Anti-Theft chain
If we know the actual path of a static file such as: Http://www.xx.com/download/51windows.pdf, if the server does not have a special limit set, we can download it effortlessly! When the site provides 51windows.pdf download, how to
' Site Validator 1.0.0' Very simple concept, run this script on your server, it records the "file details to"' XML file which you download and store. Then, when your come back to make changes can"Run the XML file back through this script and it'll
Answer | Question 1. Take the full address of the current page to return to the
Function GetUrl ()
On Error Resume Next
Dim strtemp
If LCase (Request.ServerVariables ("HTTPS") = "Off" Then
strtemp = "http://"
Else
strtemp = "https://"
End If
strtemp
Traffic | statistics | traffic | statistics
In the current Web site statistics System is most of the CGI, but the writing is particularly complex, and the ASP to learn simple, more and the advantages of combining the database, so the combination of
Bookmark the current page URL ASP tutorial code
function getip ' Get IPIf Request.ServerVariables ("Http_x_forwarded_for") =empty ThenGetip=request.servervariables ("REMOTE_ADDR")ElseGetip=request.servervariables ("Http_x_forwarded_for")End IfEnd
Elite 1. Oncontextmenu= "Window.event.returnvalue=false" will completely mask the right mouse button
no available for table
2. deselect, prevent copying
3. onpaste= "return false" is not allowed to paste
4. oncopy= ' return false; ' oncut= '
The user login system becomes more and more important in the future web. The simple truth is that since the Web site is now very anxious to be managed and to collect money from members, this is a very normal magazine, and Taiwan's company law makes
When we manage Web site files, we can put the same file name extension under the same directory, a more special names, such as the PDF file directory for the_pdf_file_s, save the following code as down.asp, his online path is
Two-level domain name as a small company often encountered the problem is the need to open a level two domain name and do not want to always through IDC, because the efficiency of IDC is really not to compliment, and IDC's attitude often let people
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.