dim conn,connstr,timesdb,rstimesdb="../www.111cn.net/#tsm_admin_data.asp"connstr="provider=microsoft.jet.oledb.4.0;data source=" & server.mappath(""×db&"")'on error resume next set conn =
'本文章提供了二款asp檔案操作函數,read開啟檔案讀取全部內容,wirte把內容寫入到一個檔案。function read(path) set mf=server.createobject("scripting.filesystemobject") set mt=mf.opentextfile(server.mappath(path),1,true,-2) if mt.atendofstream=true
建立access資料庫教程db1.mdb,在其中建立資料表user,欄位分別為:u_uid(自動),u_user(使用者名稱:文本型),u_pass(密碼:文本型) 四、建立接收register.asp中發送過來的表單資料,並插入到資料表user中的註冊成功顯示頁面:<% '字串串連資料庫的方法 set conn=server.createobject("adodb.connection") conn.open "driver=driver do
id = saferequest("id")sql="delete from table1 where whereid>"&id&""rs.open sql,conn,1,3response.write "<script>alert('刪除成功');location.href='del.asp';</script>"set rs=nothingset
on error goto z'dim url,key,wwwname url=request.servervariables("server_name") if instr(url,".")>0 then key=split(url,".") wwwname=key(0) wwwname=replace(wwwname,"http://","")end if response.write(
第一步:建立項目,建立一個簡單模版頁:TemplatePage.htm 代碼如下複製代碼 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html