' 写入文件 ' strFile 文件名(路径) , strContent 写入的内容, blnAppend 是否追加 On Error Resume Next Set objFSO = Server.CreateObject("Scripting.FileSystemObject") If blnAppend Then Set objWriteText = objFSO.OpenTextFile(strFile,8,True) Else Set objWriteText = objFSO.OpenTextFile(strFile,2,True) End If objWriteText.WriteLine (strContent) Set objWriteText = Nothing Set objFSO = Nothing ' 容错处理 Select Case Err Case 424 Response.Write "路径未找到或者该目录没有写入权限." ' Case Else Response.Write Err.Description Case Else Response.Write Err End Select End Sub