asp日誌源碼
❶ 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= -->
這里的部分,你要是不懂的話,最好不要改。對了下載的論壇一般有說明文本的,或者是管理入口的,你在進入管理入口可對論壇進入修改。