ASPÓ¦ÓÃÖ®FSO×é¼þÖ®Îļþ²Ù×÷´óÈ«
'ʹÓÃFSOÐÞ¸ÄÎļþÌض¨ÄÚÈݵĺ¯Êý
Function FSOchange(filename,Target,String)
Dim objFSO,objCountFile,FiletempData
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objCountFile = objFSO.OpenTextFile(Server.MapPath(filename),1,True)
FiletempData = objCountFile.ReadAll
objCountFile.Close
FiletempData = Replace(FiletempData,Target,String)
Set objCountFile = objFSO.CreateTextFile(Server.MapPath(filename),True)
objCountFile.Write FiletempData
objCountFile.Close
Set objCountFile = Nothing
Set objFSO = Nothing
End Function
ʹÓÃFSOдÎļþijһÐеĺ¯Êý
'ʹÓÃFSOдÎļþijһÐеĺ¯Êý
Function FSOlinewrite(filename,lineNum,Linecontent)
If linenum < 1 Then Exit Function
Dim FSO,f,temparray,tempCnt
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
If Not FSO.FileExists(Server.MapPath(filename)) Then Exit Function
Set f = FSO.OpenTextFile(Server.MapPath(filename),1)
If Not f.AtEndofStream Then
tempcnt = f.ReadAll
f.Close
temparray = Split(tempcnt,Chr(13)&Chr(10))
If lineNum>UBound(temparray)+1 Then
Exit Function
Else
temparray(lineNum-1) = lineContent
End If
tempcnt = jo& #105;n(temparray,Chr(13)&Chr(10))
Set f = FSO.cr& #101;atetextfile(Server.MapPath(filename),true)
f.Write tempcnt
End If
f.Close
Set f = Nothing
End Function
FSOÌæ»»Ö¸¶¨ÎļþµÄ×Ö·û
Function FSOLineEdit(filename,Target,String)
Dim objFSO,objCountFile,FiletempData
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objCountFile = objFSO.OpenTextFile(Server.MapPath(filename),1,True)
FiletempData = objCountFile.ReadAll
objCountFile.Close
FiletempData = Replace(FiletempData,Target,String)
Set objCountFile = objFSO.CreateTextFile(Server.MapPath(filename),True)
objCountFile.Write FiletempData
objCountFile.Close
Set objCountFile = Nothing
Set objFSO = Nothing
End Function
'Response.Write FSOLineEdit("test.txt","ÊÀ½ç","Ã÷ÌìÊÇÒ»¸öºÃÌìÈ¥")
ʹÓÃFSO¶ÁÈ¡ÎļþÄÚÈݵĺ¯Êý
Function FSOFileRead(filename)
Dim objFSO,objCou
Ïà¹ØÎĵµ£º
<input name="total" type="text" value="<%=webcounter%>" size="12" onbeforepaste="clipboarddata.setdata('text',clipboarddata.getdata('text').replace(/[^\d]/g,''))"
onkeydown="subOnKeyDown()"
onkeyup="value=value.replace(/[^\d]/g,'')"/>
ʹÓúó Èç¹ûÊäÈëΪ·ÇÊý×Ö ......
1. ASPÁ¬½ÓAccessÊý¾Ý¿âÓï¾ä
Set Conn=Server.CreateObject("ADODB.Connection")
Connstr="DBQ="+server.mappath("www/bbs.mdb")+";DefaultDir=;DRIVER={Microsoft
AccessDriver(*.mdb)};"
Conn.Open connstr
ÆäÖÐSet Conn=Server.CreateObject("ADODB.Connection")Ϊ½¨Á¢Ò»¸ö·ÃÎÊÊý¾ÝµÄ¶ÔÏó
server.mappath("w ......
<%
dim db
set db=Server.CreateObject("Adodb.Connection")
db.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=" & Server.Mappath("../mdb/count.mdb")
dim strSql,rs,visitNum
strSql="Select visitNum from counter "
SET rs=db.Execute(strSql)
if session("agai ......
½ñÌìÔÚÓÃutf-8±àÂëÓÃÔÚеÄÍøÕ¾ÉÏ£¬²»ÏëÎÊÌ⻹Õæ¶à£¬ËùÒÔÕÒÁËЩÎÄÕ£¬Ìû×Ó£¬¿´ÁË¿´£¬µÈÏÂÓÐÓõľÍÌùÏÂÃæÁË¡£
½ñÌ죬ÎÒ¿ªÊ¼°Ñ CODEPAGE="936" ¸Ä³É CODEPAGE="65001"
°Ñcharset=gb2312¸Ä³É charset=utf-8
¿ÉÊÇ»¹ÊÇÂÒÂ룬ֻҪÊǽű¾Óõĵط½»¹ÊÇÂÒÂ룬ÏÖÔÚÖÕÓÚÕÒµ½ÎÊÌâÁË£¬¾ÍÊǵ±½Å±¾Êä³öʱºò£¬ÒªÒÔutf-8±àÂëÊä³ö¡£
¾ÍÊÇ ......
»ú¹¹Ãû³Æ£º ÈÕÆÚ£º2009 - 09 - 14 ²é¿´´ÎÊý£º
334 ´Î
ASP.NetºÍASPµÄ×î´óÇø±ðÔÚÓÚ±à³Ì˼άµÄת»»£¬¶ø²»½ö½öÔÚÓÚ¹¦ÄܵÄÔöÇ¿¡£ASPʹÓÃVBS/JSÕâÑùµÄ½Å±¾ÓïÑÔ»ìºÏhtmlÀ´±à³Ì£¬¶øÄÇЩ½Å±¾ÓïÑÔÊôÓÚÈõÀàÐÍ¡¢ÃæÏò½á¹¹µÄ±à³ÌÓïÑÔ£¬¶ø·ÇÃæÏò¶ÔÏó£¬Õâ¾ÍÃ÷Ï ......