人生有太多的无奈,
是你我不能控制的,
既然这样,
就让这无奈在心底默默地承受!
是你我不能控制的,
既然这样,
就让这无奈在心底默默地承受!
4月8
1月17
windows 2003粉墨登场,很多赶时髦的用户已经早就试用了,但尽管2003号称安全性有很大突破,但其默认支持.net架构,而抛弃使用了很久的大众化的Asp的路线缺饱受质疑,需要我们手动去配置很多东西。
Windows Server 2003 默认安装,是不安装 IIS 6 的,需要另外安装。安装完 IIS 6,还需要单独开启对于 ASP 的支持。
Windows Server 2003 默认安装,是不安装 IIS 6 的,需要另外安装。安装完 IIS 6,还需要单独开启对于 ASP 的支持。
1月16
1、数据库连接。
ASP与Access数据库连接:
ASP与Access数据库连接:
<%@ language=VBscript%>
<%
dim conn,mdbfile
mdbfile=server.mappath("数据库名称.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};uid=admin;pwd=数据库密码;dbq="&mdbfile
%>
<%
dim conn,mdbfile
mdbfile=server.mappath("数据库名称.mdb")
set conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};uid=admin;pwd=数据库密码;dbq="&mdbfile
%>
1月16
Windows下打造完美的服务器平台(APACHE+JSP+CGI+PHP+ASP+MYSQL)
需要下载几个软件包:
1. php-5.0.2-Win32
2. apache_2.0.52-win32-x86-no_ssl
3. mysql-5.0.1-alpha-snapshot-win
4.iASP2.1.01
5.jakarta-tomcat-4.1.31
7.j2sdk-1_4_2-windows-i586
8.phpMyAdmin-2.6.0-pl2
9.ActivePerl-5.8.4.810-MSWin32-x86
需要下载几个软件包:
1. php-5.0.2-Win32
2. apache_2.0.52-win32-x86-no_ssl
3. mysql-5.0.1-alpha-snapshot-win
4.iASP2.1.01
5.jakarta-tomcat-4.1.31
7.j2sdk-1_4_2-windows-i586
8.phpMyAdmin-2.6.0-pl2
9.ActivePerl-5.8.4.810-MSWin32-x86
1月15
1、服务器安全设置之--硬盘权限篇
这里着重谈需要的权限,也就是最终文件夹或硬盘需要的权限,可以防御各种木马入侵,提权攻击,跨站攻击等。本实例经过多次试验,安全性能很好,服务器基本没有被木马威胁的担忧了。
这里着重谈需要的权限,也就是最终文件夹或硬盘需要的权限,可以防御各种木马入侵,提权攻击,跨站攻击等。本实例经过多次试验,安全性能很好,服务器基本没有被木马威胁的担忧了。
1月15
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
----------------------------------------------------------------------------------------
************************* 随机图片显示 ****************************
使用实例:img.asp?list=图片存放目录
使用注意:图片目录放于本文件同目录下!需要FSO支持!
说明:只要将变化图片放于一个目录下,修改下面程序的(需要修改的地方)成你的目录名称!
上传本程序和图片文件夹到同一目录下,在发帖时候使用UBB代码形如:即可!
----------------------------------------------------------------------------------------
[separator]
Function AllPath()
Dim Domain,GFilePath
Domain = Request.ServerVariables("SERVER_NAME")
GFilePath = Request.ServerVariables("PATH_INFO")
GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
AllPath = "http://"&amp;Domain&amp;GFilePath
End Function
Function ShowFileList(folderspec)
Dim Path,objFSO,objFolder,count,objFile,nume,S
Path = Server.MapPath(folderspec)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(Path) Then
Set objFolder = objFSO.GetFolder(Path)
count = 0
For Each objFile in objFolder.Files
count = count+1
Next
randomize
nume = Int((count*rnd)+1)
S = 0
ShowFileList = ""
For Each objFile in objFolder.Files
S = S + 1
If S = nume Then
ShowFileList = objFile.Name
Exit For
End If
Next
Set objFolder = Nothing
Else
ShowFileList = "NO"
End If
Set objFSO = Nothing
End Function
Dim list,filename,address,str
list = trim(Request.QueryString("list"))
if list = "" then
Response.write "本页需要正确参数引入,您缺少相关的参数!正确格式如下:"&amp;AllPath&amp;"img.asp?list=(需要修改的地方)"
Response.End()
end if
filename = ShowFileList("./"&amp;list&amp;"/")
if filename = "NO" then
Response.write "您指定的目录<b>"&amp;list&amp;"</b>不存在,请重新指定!"
Response.End()
end if
if filename = "" then
Response.write "您指定的目录<b>"&amp;list&amp;"</b>没有相关的图片文件存在,请重新指定!"
Response.End()
end if
str = right(filename,3)
if str<>"jpg" and str<>"gif" then
filename = "erro.gif"
end if
address = AllPath&amp;list&amp;"/"
address = address&amp;filename
%>
<%Response.redirect(address)%>
<%
----------------------------------------------------------------------------------------
************************* 随机图片显示 ****************************
使用实例:img.asp?list=图片存放目录
使用注意:图片目录放于本文件同目录下!需要FSO支持!
说明:只要将变化图片放于一个目录下,修改下面程序的(需要修改的地方)成你的目录名称!
上传本程序和图片文件夹到同一目录下,在发帖时候使用UBB代码形如:即可!
----------------------------------------------------------------------------------------
[separator]
Function AllPath()
Dim Domain,GFilePath
Domain = Request.ServerVariables("SERVER_NAME")
GFilePath = Request.ServerVariables("PATH_INFO")
GFilePath = lcase(left(GFilePath,instrRev(GFilePath,"/")))
AllPath = "http://"&amp;Domain&amp;GFilePath
End Function
Function ShowFileList(folderspec)
Dim Path,objFSO,objFolder,count,objFile,nume,S
Path = Server.MapPath(folderspec)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(Path) Then
Set objFolder = objFSO.GetFolder(Path)
count = 0
For Each objFile in objFolder.Files
count = count+1
Next
randomize
nume = Int((count*rnd)+1)
S = 0
ShowFileList = ""
For Each objFile in objFolder.Files
S = S + 1
If S = nume Then
ShowFileList = objFile.Name
Exit For
End If
Next
Set objFolder = Nothing
Else
ShowFileList = "NO"
End If
Set objFSO = Nothing
End Function
Dim list,filename,address,str
list = trim(Request.QueryString("list"))
if list = "" then
Response.write "本页需要正确参数引入,您缺少相关的参数!正确格式如下:"&amp;AllPath&amp;"img.asp?list=(需要修改的地方)"
Response.End()
end if
filename = ShowFileList("./"&amp;list&amp;"/")
if filename = "NO" then
Response.write "您指定的目录<b>"&amp;list&amp;"</b>不存在,请重新指定!"
Response.End()
end if
if filename = "" then
Response.write "您指定的目录<b>"&amp;list&amp;"</b>没有相关的图片文件存在,请重新指定!"
Response.End()
end if
str = right(filename,3)
if str<>"jpg" and str<>"gif" then
filename = "erro.gif"
end if
address = AllPath&amp;list&amp;"/"
address = address&amp;filename
%>
<%Response.redirect(address)%>







