Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : asp

asp³£Óú¯Êý

1.·Å×¢È뺯Êý
sub aspsql()
SQL_injdata = "'|;|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.Form<>"" Then
For Each Sql_Post In Request.Form
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.Form(Sql_Post),Sql_Inj(Sql_DATA))>0 Then
response.write "<mce:script language='javascript'><!--
"
response.write "alert('ÍøÕ¾°²È«Ìáʾ£ºÇë²»ÒªÔÚ²ÎÊýÖаüº¬·Ç·¨×Ö·û£¡');"
response.write "location.href='javascript:history.go(-1)';"
response.write "
// --></mce:script>"
response.end
end if
next
next
end if
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
response.write "<mce:script language='javascript'><!--
"
response.write "alert('ÍøÕ¾°²È«Ìáʾ£ºÇë²»ÒªÔÚ²ÎÊýÖаüº¬·Ç·¨×Ö·û£¡');"
response.write "location.href='javascript:history.go(-1) ......

asp¶à·ç¸ñ·ÖÒ³Àà

 <%
'asp¶à·ç¸ñ·ÖÒ³Àà
'ʹÓ÷¶Àý
'==========================================================================
'Set test = New Page '´´½¨À²
'test.CurrentPage=1 '×Ô¼ºÈ¥¶ÁÈ¡À­,µ±Ç°µÄÒ³Êý
'test.temp="{N1}{N2}{N3} {N4}"'ÕâÀïÊÇÏÔʾµÄÄ£°æ,×Ô¼º¿ÉÒÔ¶¨Òå,ÖÁÓÚ±êÇ©,¿ÉÒÔ×Ô¼ºÈ¥ÄǸöÀàÀïÕÒ
'test.Exec "Select * from [movie]",conn 'ÕâÀïÖ´ÐÐsqlÓï¾ä,conn¾ÍÊÇÊý¾ÝÁ¬½Ó¶ÔÏóÁË
'test.Show 1 'ÏÔʾ·ÖÒ³Ñùʽ,¿ÉÒÔ¸ù¾ÝÓû§ÊäÈëµÄ²ÎÊý°ÑÕâÀïµÄ1»»³É±äÁ¿
'=====================================================================
Class Page
Private CurrPage
Private PageN
Private UrlStr
Private TempStr
Private ErrInfo
Private IsErr
Private TotalRecord
Private TotalPage
Public PageRs
Private TempA(11)
Private TempB(8)
'------------------------------------------------------------
Private Sub Class_Initialize()
CurrPage=1'//ĬÈÏÏÔʾµ±Ç°Ò³ÎªµÚÒ»Ò³
PageN=10'//ĬÈÏÿҳÏÔʾ10ÌõÊý¾Ý
UrlStr="#"
TempStr=""
ErrInfo="ErrInfo:"
IsErr=False
End Sub
Private Sub Class_Terminate()
If IsObject(PageRs) ......

aspÉÏ´«Àà

 1.UpLoadClass.asp
<%
Class UpLoadClass
Private p_MaxSize,p_FileType,p_SavePath,p_AutoSave,p_Error
Private objForm,binForm,binItem,strDate,lngTime
Public FormItem,FileItem
Public Property Get Version
Version=""
End Property
Public Property Get Error
Error=p_Error
End Property
Public Property Get MaxSize
MaxSize=p_MaxSize
End Property
Public Property Let MaxSize(lngSize)
if isNumeric(lngSize) then
p_MaxSize=clng(lngSize)
end if
End Property
Public Property Get FileType
FileType=p_FileType
End Property
Public Property Let FileType(strType)
p_FileType=strType
End Property
Public Property Get SavePath
SavePath=p_SavePath
End Property
Public Property Let SavePath(strPath)
p_SaveP ......

aspÉÏ´«Àà2

 1.html´úÂë  formnameÊÇ±íµ¥name,editnameÊÇÎļþÓòname,uppathÊÇÉÏ´«Îļþ±£´æ·¾¶.
<input name="qtxx" type="text" id="qtxx" size="50" />
 
<input type="button" name="Submit22" value="ÉÏ´«Í¼Æ¬" onClick="window.open('upload.asp?formname=from1&editname=qtxx&uppath=../UpLoadFile&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">  
2.upload.asp
<%
uppath=request("uppath")&"/"
filelx=request("filelx")
formName=request("formName")
EditName=request("EditName")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css.css" mce_href="css.css" rel="stylesheet" type="text/css">
<mce:script language="javascript"><!--
function mysub()
{
esave.style.visibility="visible";
}
// --></mce:script>
<title>ͼƬÉÏ´«</title></head>
<body>
<form name="form1" method="post ......

asp AccessÊý¾Ý±¸·Ý,»¹Ô­,ѹËõÀà

 <!--#include file="config.asp" -->
<!--#include file="Fun.asp" -->
<%
'Êý¾Ý¿â¹ÜÀíÀà
class Datas
'±¸·Ý
public sub Bk()
Set fso=server.createobject("scripting.filesystemobject")
fso.CopyFile Server.MapPath(SiteDataPath),Server.MapPath(SiteDataBakPath)
set fso=nothing
response.Write("<mce:script language=javascript><!--
alert('±¸·Ý³É¹¦£¡');window.location.href='DataManage.asp'
// --></mce:script>")
end sub

'»¹Ô­
public sub Rt()
SDPath = server.mappath(SiteDataPath)
SDBPath = server.mappath(SiteDataBakPath)
set Fso=Server.CreateObject("Scripting.FileSystemObject")
if Fso.FileExists(SDBPath) then
Fso.CopyFile SDBPath,SDPath
Set Fso=nothing
response.Write("<mce:script language=javascript><!--
alert('³É¹¦£ºÄãÒѾ­³É¹¦»Ö¸´Êý¾Ý¿â!');window.location.href='DataManage.asp?action=rt'
// --></mce:script>")
else
response.Write("<mce ......

asp AccessÊý¾Ý±¸·Ý,»¹Ô­,ѹËõÀà

 <!--#include file="config.asp" -->
<!--#include file="Fun.asp" -->
<%
'Êý¾Ý¿â¹ÜÀíÀà
class Datas
'±¸·Ý
public sub Bk()
Set fso=server.createobject("scripting.filesystemobject")
fso.CopyFile Server.MapPath(SiteDataPath),Server.MapPath(SiteDataBakPath)
set fso=nothing
response.Write("<mce:script language=javascript><!--
alert('±¸·Ý³É¹¦£¡');window.location.href='DataManage.asp'
// --></mce:script>")
end sub

'»¹Ô­
public sub Rt()
SDPath = server.mappath(SiteDataPath)
SDBPath = server.mappath(SiteDataBakPath)
set Fso=Server.CreateObject("Scripting.FileSystemObject")
if Fso.FileExists(SDBPath) then
Fso.CopyFile SDBPath,SDPath
Set Fso=nothing
response.Write("<mce:script language=javascript><!--
alert('³É¹¦£ºÄãÒѾ­³É¹¦»Ö¸´Êý¾Ý¿â!');window.location.href='DataManage.asp?action=rt'
// --></mce:script>")
else
response.Write("<mce ......

ASPº¯Êý´óÈ«

 ASPº¯ÊýÓëVBSCRIPTÀàËÆ£¬ÒÔϾÙһЩ³£Óõĺ¯Êý¡¡
¡¡
Array()¡¡
¡¡
º¯Êý·µ»ØÒ»¸öÊý×é¡¡
¡¡
±í´ïʽ Array(list)¡¡
¡¡
ÔÊÐíÊý¾ÝÀàÐÍ: ×Ö·û£¬Êý×Ö¾ù¿É¡¡
¡¡
ʵÀý£º <%¡¡
¡¡
Dim myArray()¡¡
¡¡
For i = 1 to 7¡¡
¡¡
Redim Preserve myArray(i)¡¡
¡¡
myArray(i) = WeekdayName(i)¡¡
¡¡
Next¡¡
¡¡
%>¡¡
¡¡
·µ»Ø½á¹û: ½¨Á¢ÁËÒ»¸ö°üº¬7¸öÔªËصÄÊý×émyArray¡¡
¡¡
myArray("Sunday","Monday", ... ... "Saturday"¡¡
¡¡
¡¡
CInt()¡¡
¡¡
º¯Êý½«Ò»¸ö±í´ïʽת»¯ÎªÊý×ÖÀàÐÍ¡¡
¡¡
±í´ïʽ CInt(expression)¡¡
¡¡
ÔÊÐíÊý¾ÝÀàÐÍ: ÈκÎÓÐЧµÄ×Ö·û¾ù¿É¡¡
¡¡
ʵÀý£º <%¡¡
¡¡
f = "234"¡¡
¡¡
response.write cINT(f) + 2¡¡
¡¡
%>¡¡
¡¡
·µ»Ø½á¹û: 236¡¡
¡¡
ת»¯×Ö·û"234"ΪÊý×Ö"234"£¬Èç¹û×Ö·û´®Îª¿Õ£¬Ôò·µ»Ø0Öµ¡¡
¡¡
¡¡
CreateObject()¡¡
¡¡
º¯Êý½¨Á¢ºÍ·µ»ØÒ»¸öÒÑ×¢²áµÄACTIVEX×é¼þµÄʵÀý¡£¡¡
¡¡
±í´ïʽ CreateObject(objName)¡¡
¡¡
ÔÊÐíÊý¾ÝÀàÐÍ: objName ÊÇÈκÎÒ»¸öÓÐЧ¡¢ÒÑ×¢²áµÄACTIVEX×é¼þµÄÃû×Ö.¡¡
¡¡
ʵÀý£º <%¡¡
¡¡
Set con = Server.CreateObject("ADODB.Connection"¡¡
¡¡
%>¡¡
¡ ......
×ܼǼÊý:617; ×ÜÒ³Êý:103; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [71] [72] [73] [74] 75 [76] [77] [78] [79] [80]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ