|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP一般认为只能运行在IIS上,正如前面所提到的,这并不是十分正确,事实上,ASP也能运行在Apache上。ApacheASP可在任意Apache服务器上运行有限的ASP功能,所需做的,只需打开mod_perl。程序|数据|数据库chinaasp论坛完全程序下载:
http://www.yescnet.com/manage.asp?url=down/list.asp**id=89
http://user.7host.com/yescnet/manage.asp?url=down/list.asp**id=90
由于我装的是MSDE,没有发明查询剖析器,也没举措运转sql文件,我各处支找SQL的光盘也找不到,苦
末路了好一陈子。只能在导出导进里新建一个数据库(呵呵,发明在ms.net里竟然能够编纂检察sql数据
库,固然也不克不及运转sql,不外给了我很多便利),就此写了一个ASP文件。全主动的天生chinaasp的sql
数据库。</P><P>往chinaasp不以为甚么,如今真正解开他的内容一看,真的使人叹服,委实是佳构中的佳构。难怪这么
多人效仿而乐此不疲。</P><P>假如你有查询剖析器,这个用一下归正也很便利,假如你没有查询剖析器,那是更好了,个中毗连SQL的
多是被人改了,不克不及用,我都改好了。</P><P>今后假如写其他的SOL数据库,只需翻开conn.asp与setup.asp。独具匠心就是了,总之自已手写出来的
器材,用得特恬逸。</P><P>声明:好象chinaasp不供应无偿使用的受权,我也不太分明,这个地道是团体研讨,不成以真的拿往用了
或改了。</P><P>CONN.ASP文件:
<%
dimconn
dimconnstr
connstr="driver={SQLServer};server=localhost;UID=sa;PWD=;database=bbsbbs"
setconn=server.createobject("ADODB.CONNECTION")
iferr.number<>0then
err.clear
setconn=nothing
Response.Write"创立ADO工具失利"
Response.End
else
conn.openconnstr
iferrthen
err.clear
setconn=nothing
Response.Write"SQL数据库毗连失利,请反省数据库是不是存在,和odbc是不是存在"
Response.End
endif
endif</P><P>subendConnection()
conn.close
endsub
%></P><P>setup.asp文件:
<!--#includefile="conn.asp"-->
<html>
<STYLETYPE="text/CSS">
<!--
body{
BACKGROUND:white;
FONT-FAMILY:宋体;
FONT-SIZE:75%
}
-->
</STYLE>
<title>chinaasp安装</title><body>
<%</P><P>IfRequest.QueryString("setup")="yes"Then</P><P>onerrorresumenext</P><P>SetadoRS=Server.CreateObject("ADODB.Recordset")</P><P>strSQL="CREATETABLEAnnounce("
strSQL=strSQL+"AnnounceIDintIDENTITY(1,1)NOTNULL,"
strSQL=strSQL+"ParentIDintNULL,"
strSQL=strSQL+"ChildintNULL,"
strSQL=strSQL+"BoardIDintNULL,"
strSQL=strSQL+"UserNamenvarchar(50)NULL,"
strSQL=strSQL+"UserEmailnvarchar(255)NULL,"
strSQL=strSQL+"URLnvarchar(255)NULL,"
strSQL=strSQL+"URLTitlenvarchar(255)NULL,"
strSQL=strSQL+"URLPicnvarchar(255)NULL,"
strSQL=strSQL+"Topicnvarchar(255)NULL,"
strSQL=strSQL+"BodyntextNULL,"
strSQL=strSQL+"DateAndTimedatetimeNULL,"
strSQL=strSQL+"hitsintNULL,"
strSQL=strSQL+"lengthintNULL,"
strSQL=strSQL+"RootIDintNULL,"
strSQL=strSQL+"layerintNULL,"
strSQL=strSQL+"ordersintNULL,"
strSQL=strSQL+"emoteintNULL,"
strSQL=strSQL+"ipnvarchar(20)NULL,"
strSQL=strSQL+"signaturenvarchar(255)NULL,"
strSQL=strSQL+"replyMailbitNOTNULL"
strSQL=strSQL+")"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATETABLEboard("
strSQL=strSQL+"BoardIDintIDENTITY(1,1)NOTNULL,"
strSQL=strSQL+"BoardNamenvarchar(100)NULL,"
strSQL=strSQL+"BoardMasterintNULL,"
strSQL=strSQL+"BoardMaster2intNULL,"
strSQL=strSQL+"BoardMaster3intNULL,"
strSQL=strSQL+"cateIDintNULL,"
strSQL=strSQL+"descriptionnvarchar(500)NULL"
strSQL=strSQL+")"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATETABLEboardCate("
strSQL=strSQL+"idintIDENTITY(1,1)NOTNULL,"
strSQL=strSQL+"CateNamenvarchar(50)NOTNULL,"
strSQL=strSQL+"Descriptionnvarchar(244)NULL,"
strSQL=strSQL+"OrdersintNULL"
strSQL=strSQL+")"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATETABLEessence("
strSQL=strSQL+"idintIDENTITY(1,1)NOTNULL,"
strSQL=strSQL+"announceidintNULL,"
strSQL=strSQL+"boardidintNULL,"
strSQL=strSQL+"usernamenvarchar(50)NULL,"
strSQL=strSQL+"useremailnvarchar(255)NULL,"
strSQL=strSQL+"urlnvarchar(255)NULL,"
strSQL=strSQL+"urlTitlenvarchar(255)NULL,"
strSQL=strSQL+"urlPicnvarchar(255)NULL,"
strSQL=strSQL+"Topicnvarchar(255)NULL,"
strSQL=strSQL+"BodyntextNULL,"
strSQL=strSQL+"dateAndTimenvarchar(50)NULL,"
strSQL=strSQL+"hitsintNULL,"
strSQL=strSQL+"lengthintNULL,"
strSQL=strSQL+"emoteintNULL,"
strSQL=strSQL+"keywordsnvarchar(255)NULL"
strSQL=strSQL+")"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATETABLEsite("
strSQL=strSQL+"SiteMasterPwdnvarchar(50)NULL"
strSQL=strSQL+")"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATETABLE[user]("
strSQL=strSQL+"UserIDintIDENTITY(1,1)NOTNULL,"
strSQL=strSQL+"UserNamenvarchar(50)NULL,"
strSQL=strSQL+"UserEmailnvarchar(255)NULL,"
strSQL=strSQL+"UserPasswordnvarchar(11)NULL,"
strSQL=strSQL+"icqnvarchar(20)NULL,"
strSQL=strSQL+"homepagenvarchar(255)NULL,"
strSQL=strSQL+"sexnvarchar(10)NULL,"
strSQL=strSQL+"passanswernvarchar(100)NULL,"
strSQL=strSQL+"incometimesmalldatetimeNULL,"
strSQL=strSQL+"birthdaysmalldatetimeNULL,"
strSQL=strSQL+"pointsintNULL,"
strSQL=strSQL+"visitsintNULL,"
strSQL=strSQL+"countrynvarchar(20)NULL,"
strSQL=strSQL+"citynvarchar(20)NULL,"
strSQL=strSQL+"passquestnvarchar(100)NULL,"
strSQL=strSQL+"signaturenvarchar(255)NULL,"
strSQL=strSQL+"disabledintNULL"
strSQL=strSQL+")"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="ALTERTABLE[boardCate]WITHNOCHECKADDCONSTRAINT[PK_boardCate]PRIMARYKEYCLUSTERED([id])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="ALTERTABLE[Announce]WITHNOCHECKADDCONSTRAINT[DF__announce__replyM__3F466844]DEFAULT(0)FOR[replyMail],"
strSQL=strSQL+"CONSTRAINT[PK_Announce]PRIMARYKEYNONCLUSTERED([AnnounceID])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="ALTERTABLE[board]WITHNOCHECKADDCONSTRAINT[PK_board]PRIMARYKEYNONCLUSTERED([BoardID])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="ALTERTABLE[essence]WITHNOCHECKADDCONSTRAINT[PK_essence]PRIMARYKEYNONCLUSTERED([id])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="ALTERTABLE[user]WITHNOCHECKADDCONSTRAINT[DF_user_disabled]DEFAULT(0)FOR[disabled],"
strSQL=strSQL+"CONSTRAINT[PK_user]PRIMARYKEYNONCLUSTERED([UserID])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[Boardid]ON[Announce]([BoardID])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[announce0]ON[Announce]([BoardID],[AnnounceID],[ParentID])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[IX_Announce]ON[Announce]([orders])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[announce00]ON[Announce]([RootID],[BoardID],[orders])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[IX_boardCate]ON[boardCate]([Orders])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[Boardid]ON[essence]([boardid])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[points]ON[user]([points])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[username]ON[dbo].[user]([UserName])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="CREATEINDEX[IX_user]ON[dbo].[user]([UserName])"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="insertsite(sitemasterpwd)values(12345)"
SetadoRS=Conn.Execute(strSQL)</P><P>strSQL="altertableannounceaddlockbitNOTNULLDEFAULT(0)"
SetadoRS=Conn.Execute(strSQL)</P><P>%></P><P><p></p>
<p>操纵乐成,请勿在不异的数据库反复安装,<ahref="DEFAULT.ASP"target="_blank">请登录论坛</a><br>
<br>
<br>
<ahref="admin"target="_blank">办理暗码已为您设置为12345,请登录办理页面</a></p>
<%
Else
Response.Write("<ahref=setup.asp?setup=yes>单击此处入手下手安装</a><br><br><br><ahref=""http://www.yescnet.com"">一鹤的chinaasp论坛数据库安装程序</a>")
EndIf
%>
<hr>
<palign="center"><br>
<ahref="http://www.yescnet.com"target="_blank">一鹤的chinaasp论坛数据库安装程序</a>||
<ahref="http://www.yescnet.com">CNET中文网</a>||<ahref="http://www.yescnet.com">WWW.YESCNET.COM</a></p>
</body></html>
ASP由于使用了COM组件所以它会变的十分强大,但是这样的强大由于WindowsNT系统最初的设计问题而会引发大量的安全问题。只要在这样的组件或是操作中一不注意,哪么外部攻击就可以取得相当高的权限而导致网站瘫痪或者数据丢失; |
|