当前位置:首页 » 操作系统 » asp日志源码

asp日志源码

发布时间: 2023-03-22 08:10:37

❶ asp写文件源码

<%
ifrequest.ServerVariables("REQUEST_METHOD")="POST"then
dimtxt1,txt2
txt1=trim(Request.Form("txt1"))
txt2=trim(Request.Form("txt2"))
iftxt1="123456"then
iftxt2<>""then
dimwclfso,wclwrite
setwclfso=Server.CreateObject("Scripting.Filesystemobject")
setwclwrite=wclfso.OpenTextFile(Server.MapPath("1.txt"),8,-1,0)
wclwrite.writetxt2&vbCrlf
wclwrite.close():setwclwrite=nothing
setwclfso=nothing
response.Write("写入成功!<ahref='1.txt'乱猜大>点击查看</a>")
response.End()
else
response.Write("没有要写入的内容!")
response.End()
endif
else
response.Write("错误!")
response.End()
endif
endif
%>
<formid="form1"name="form1"method="post"action="">
<p>文本框一:
<inputtype="text"name="txt1"id="txt1"/>
<兆孙/p>
<p>文本框二:
<inputtype="text"哗竖name="txt2"id="txt2"/>
</p>
<p>
<inputtype="submit"name="button"id="button"value="提交"/>
</p>
</form>

这是才敲的代码,本地测试通过。你试试吧

❷ 如何查看ASP源代码

asp属于动态网页,你看不到源代码的,如果你作服务器的话,你可以使用写字版打开查看,另外对于2000的服务器,黑客有个程序好象叫”白鸽”,在有漏洞的情况下可以查看asp的源代码!

❸ ASP+JS日历源代码

直接保存成 asp文件 运行就可以
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="http://purl.org/dc" rel="schema.DC" />
<title>日历</title
</head>
<body bgcolor="#FFFFFF">
<%
' 要调用的函数声明
'根据年份及月份得到每月的总天数
Function GetDaysInMonth(iMonth, iYear)
Select Case iMonth
Case 1, 3, 5, 7, 8, 10, 12
GetDaysInMonth = 31
Case 4, 6, 9, 11
GetDaysInMonth = 30
Case 2
If IsDate("February 29, " & iYear) Then
GetDaysInMonth = 29
Else
GetDaysInMonth = 28
End If
End Select
End Function
'得到一个月开始的日期.
Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth)
Dim dTemp
dTemp = DateAdd("d", -(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth)
GetWeekdayMonthStartsOn = WeekDay(dTemp)
End Function
'得到当前一个月的上一个月.
Function SubtractOneMonth(dDate)
SubtractOneMonth = DateAdd("m", -1, dDate)
End Function
'得到当前一个月的下一个月.
Function AddOneMonth(dDate)
AddOneMonth = DateAdd("m", 1, dDate)
End Function
' 函数声明结束

Dim dDate ' 日历显示的日期
Dim iDOW ' 每一月开始的日期
Dim iCurrent ' 当前日期
Dim iPosition ' 表格中的当前位置

' 得到选择的日期并检查日期的合法性
If IsDate(Request.QueryString("date")) Then
dDate = CDate(Request.QueryString("date"))
Else
If IsDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year")) Then
dDate = CDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year"))
Else
dDate = Date()

If Len(Request.QueryString("month")) <> 0 Or Len(Request.QueryString("day")) <> 0 Or Len(Request.QueryString("year")) <> 0 Or Len(Request.QueryString("date")) <> 0 Then
Response.Write "您所选择的日期格式不正确,系统会使用当前日期.<BR><BR>"
End If

End If
End If

'得到日期后我们先得到这个月的天数及这个月的起始日期.
iDIM = GetDaysInMonth(Month(dDate), Year(dDate))
iDOW = GetWeekdayMonthStartsOn(dDate)

%>
<table width="180" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"> </td>
</tr>
</table>
<table width="180" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" colspan="7"><table border="0" cellpadding="0" cellspacing="0"width="100%">
<tr>
<td height="22" align="right"><a href="rl.asp?date=<%= SubtractOneMonth(dDate) %>"><img src="../images/dot_left.gif" width="15" height="14" border="0" /></a></td>
<td align="center"><font color="999999"><b><%= MonthName(Month(dDate)) & " " & Year(dDate) %></b></font></td>
<td><a href="rl.asp?date=<%= AddOneMonth(dDate) %>"><img src="../images/dot_right.gif" width="15" height="14" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td width="25" height="22" align="center"><font
color="d08c00"><b>日</b></font> </td>
<td width="25" align="center"><b><font color="999999">一</font></b> </td>
<td width="25" align="center"><b><font color="999999">二</font></b> </td>
<td width="25" align="center"><b><font color="999999">三</font></b> </td>
<td width="25" align="center"><b><font color="999999">四</font></b> </td>
<td width="25" align="center"><b><font color="999999">五</font></b> </td>
<td width="25" align="center"><b><font color="d08c00">六</font></b> </td>
</tr>
<%
' 如果这个月的起始日期不是周日的话就加空的单元.
If iDOW <> 1 Then
Response.Write vbTab & "<TR>" & vbCrLf
iPosition = 1
Do While iPosition < iDOW
Response.Write vbTab & vbTab & "<TD></TD>" & vbCrLf
iPosition = iPosition + 1
Loop
End If

' 绘制这个月的日历
iCurrent = 1
iPosition = iDOW
Do While iCurrent <= iDIM
' 如果是一行的开头就使用 TR 标记
If iPosition = 1 Then
Response.Write vbTab & "<TR>" & vbCrLf
End If

' 如果这一天是我们选择的日期就高亮度显示该日期.
If iCurrent = Day(dDate) Then
Response.Write vbTab & vbTab & "<TD BGCOLOR=#eeeeee height=18 align=center><B>" & iCurrent & "</B></TD>" & vbCrLf
Else
Response.Write vbTab & vbTab & "<TD height=18 align=center><A HREF=""./rl.asp?date=" & Month(dDate) & "-" & iCurrent & "-" & Year(dDate) & """>" & iCurrent & "</A></TD>" & vbCrLf
End If

' 如果满一周的话表格就另起一行
If iPosition = 7 Then
Response.Write vbTab & "</TR>" & vbCrLf
iPosition = 0
End If

iCurrent = iCurrent + 1
iPosition = iPosition + 1
Loop

' 如果一个月不是以周六结束则加上相应的空单元.
If iPosition <> 1 Then
Do While iPosition <= 7
Response.Write vbTab & vbTab & "<TD></TD>" & vbCrLf
iPosition = iPosition + 1
Loop
Response.Write vbTab & "</TR>" & vbCrLf
End If
%>
</table>
<table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="5"> </td>
</tr>
</table></td>
</tr>
</table>

❹ 会员注册了的ASP页面增加日志功能的源码有嘛

没有记录穗明登陆后的信燃族哗息。

可以使用COOKIE,SESSION等方式保存登录皮行后的会话信息。

❺ 求一个个人ASP网站源码

现成的源码可以在 源码网站下载 我们也可以根据需求定做

❻ 怎么改ASP源码

asp的源码为

寻找这样的标记
<% %> 在百分号中的为代码部分
<% 这里为asp执行的代码部分 %>

其余的没有被<%%>,包起来的部分为html语法部分,他们不执行,直接被下到浏览器上。

打开一个asp站点的流程:
向站点(服务器)发一个url申请,服务器执行<%%>中相关的代码(没有被<%%>包起的不执行),后把代码执行后的内容与差御没执行的部分生html文档,然后把这个html文档返给浏览器。
所以在浏览器中我们看到是的html中的内容。

如果想想改代码的话,可以直接改不被<%%>包起的html部分,最好懂点html语法,改错的话,一般来说也是可以显示的,只是页面可能出现变形等错误兆庆老。
如果族升改<%%> 中的内容的,至少也应该懂得asp语法,或者是vb的语法。

关于使用UTF-8出现乱码的问题,请看这个文章
http://www.cnzhai.com/blogview.asp?logID=304

<%

%>
<!--include file= -->
这里的部分,你要是不懂的话,最好不要改。对了下载的论坛一般有说明文本的,或者是管理入口的,你在进入管理入口可对论坛进入修改。

热点内容
精通脚本 发布:2025-05-20 14:42:56 浏览:385
东方财富经典版如何更改密码 发布:2025-05-20 14:42:43 浏览:944
砸口红解压 发布:2025-05-20 14:41:02 浏览:511
配置sp失败怎么办 发布:2025-05-20 14:35:08 浏览:179
java学到什么程度 发布:2025-05-20 14:31:54 浏览:480
压缩误差分析 发布:2025-05-20 14:27:53 浏览:98
每秒上亿次访问服务器怎么处理 发布:2025-05-20 14:10:07 浏览:315
按键精灵数据库操作 发布:2025-05-20 14:08:33 浏览:593
360浏览器无法访问网络 发布:2025-05-20 14:05:13 浏览:835
存储服务器地址错误 发布:2025-05-20 14:01:46 浏览:913